summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2019-08-20 21:23:28 +0000
committerSanjay Patel <spatel@rotateright.com>2019-08-20 21:23:28 +0000
commitd5035727ad2cd8a3ab501250c78a68e8cb52dd5c (patch)
treed1e32f6abbd027c4ab5bc9ee93ff180a8529dcc4
parent08a5a0aa252aca6e5d7c82247075072d317f1925 (diff)
downloadbcm5719-llvm-d5035727ad2cd8a3ab501250c78a68e8cb52dd5c.tar.gz
bcm5719-llvm-d5035727ad2cd8a3ab501250c78a68e8cb52dd5c.zip
[InstCombine] add more extra use tests for icmp with extends; NFC
llvm-svn: 369447
-rw-r--r--llvm/test/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll36
1 files changed, 34 insertions, 2 deletions
diff --git a/llvm/test/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll b/llvm/test/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll
index 934d981d81b..f5a0c1c259d 100644
--- a/llvm/test/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll
+++ b/llvm/test/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll
@@ -425,8 +425,8 @@ define i1 @different_size_sext_zext_ne(i7 %x, i4 %y) {
declare void @use(i25)
-define i1 @different_size_sext_sext_ule_extra_use(i7 %x, i4 %y) {
-; CHECK-LABEL: @different_size_sext_sext_ule_extra_use(
+define i1 @different_size_sext_sext_ule_extra_use1(i7 %x, i4 %y) {
+; CHECK-LABEL: @different_size_sext_sext_ule_extra_use1(
; CHECK-NEXT: [[SX:%.*]] = sext i7 [[X:%.*]] to i25
; CHECK-NEXT: [[SY:%.*]] = sext i4 [[Y:%.*]] to i25
; CHECK-NEXT: call void @use(i25 [[SY]])
@@ -439,3 +439,35 @@ define i1 @different_size_sext_sext_ule_extra_use(i7 %x, i4 %y) {
%r = icmp ule i25 %sx, %sy
ret i1 %r
}
+
+define i1 @different_size_sext_sext_ule_extra_use2(i7 %x, i4 %y) {
+; CHECK-LABEL: @different_size_sext_sext_ule_extra_use2(
+; CHECK-NEXT: [[SX:%.*]] = sext i7 [[X:%.*]] to i25
+; CHECK-NEXT: call void @use(i25 [[SX]])
+; CHECK-NEXT: [[SY:%.*]] = sext i4 [[Y:%.*]] to i25
+; CHECK-NEXT: [[R:%.*]] = icmp ule i25 [[SX]], [[SY]]
+; CHECK-NEXT: ret i1 [[R]]
+;
+ %sx = sext i7 %x to i25
+ call void @use(i25 %sx)
+ %sy = sext i4 %y to i25
+ %r = icmp ule i25 %sx, %sy
+ ret i1 %r
+}
+
+define i1 @different_size_sext_sext_ule_extra_use3(i7 %x, i4 %y) {
+; CHECK-LABEL: @different_size_sext_sext_ule_extra_use3(
+; CHECK-NEXT: [[SX:%.*]] = sext i7 [[X:%.*]] to i25
+; CHECK-NEXT: call void @use(i25 [[SX]])
+; CHECK-NEXT: [[SY:%.*]] = sext i4 [[Y:%.*]] to i25
+; CHECK-NEXT: call void @use(i25 [[SY]])
+; CHECK-NEXT: [[R:%.*]] = icmp ule i25 [[SX]], [[SY]]
+; CHECK-NEXT: ret i1 [[R]]
+;
+ %sx = sext i7 %x to i25
+ call void @use(i25 %sx)
+ %sy = sext i4 %y to i25
+ call void @use(i25 %sy)
+ %r = icmp ule i25 %sx, %sy
+ ret i1 %r
+}
OpenPOWER on IntegriCloud