mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-07 04:21:27 +00:00
ae359d99fb
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270265 91177308-0d34-0410-b5e6-96231b3b80d8
14 lines
367 B
LLVM
14 lines
367 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
|
|
|
define i64 @rem_unsigned(i64 %x1, i64 %y2) {
|
|
; CHECK-LABEL: @rem_unsigned(
|
|
; CHECK-NEXT: [[R:%.*]] = urem i64 %x1, %y2
|
|
; CHECK-NEXT: ret i64 [[R]]
|
|
;
|
|
%r = udiv i64 %x1, %y2
|
|
%r7 = mul i64 %r, %y2
|
|
%r8 = sub i64 %x1, %r7
|
|
ret i64 %r8
|
|
}
|