aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/urem.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstCombine/urem.ll')
-rw-r--r--test/Transforms/InstCombine/urem.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/urem.ll b/test/Transforms/InstCombine/urem.ll
new file mode 100644
index 000000000000..24e7463cbaf8
--- /dev/null
+++ b/test/Transforms/InstCombine/urem.ll
@@ -0,0 +1,8 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep urem
+
+define i64 @rem_unsigned(i64 %x1, i64 %y2) {
+ %r = udiv i64 %x1, %y2
+ %r7 = mul i64 %r, %y2
+ %r8 = sub i64 %x1, %r7
+ ret i64 %r8
+}