summaryrefslogtreecommitdiff
path: root/test/Transforms/InstSimplify/rem.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstSimplify/rem.ll')
-rw-r--r--test/Transforms/InstSimplify/rem.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/InstSimplify/rem.ll b/test/Transforms/InstSimplify/rem.ll
index df3f659b782e4..c73d34346ded5 100644
--- a/test/Transforms/InstSimplify/rem.ll
+++ b/test/Transforms/InstSimplify/rem.ll
@@ -49,3 +49,17 @@ define i32 @rem3(i32 %x, i32 %n) {
%mod1 = urem i32 %mod, %n
ret i32 %mod1
}
+
+declare i32 @external()
+
+define i32 @rem4() {
+; CHECK-LABEL: @rem4(
+; CHECK: [[CALL:%.*]] = call i32 @external(), !range !0
+; CHECK-NEXT: ret i32 [[CALL]]
+;
+ %call = call i32 @external(), !range !0
+ %urem = urem i32 %call, 3
+ ret i32 %urem
+}
+
+!0 = !{i32 0, i32 3}