[llvm] 5de47eb - precommit test cleanup for D97077

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 19 12:19:52 PST 2021


Author: Philip Reames
Date: 2021-02-19T12:19:39-08:00
New Revision: 5de47ebff6d763a1ee7030252227a64a6dcce521

URL: https://github.com/llvm/llvm-project/commit/5de47ebff6d763a1ee7030252227a64a6dcce521
DIFF: https://github.com/llvm/llvm-project/commit/5de47ebff6d763a1ee7030252227a64a6dcce521.diff

LOG: precommit test cleanup for D97077

Added: 
    

Modified: 
    llvm/test/Analysis/ScalarEvolution/ranges.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Analysis/ScalarEvolution/ranges.ll b/llvm/test/Analysis/ScalarEvolution/ranges.ll
index d38e522cdb8a..1152e1a1f19e 100644
--- a/llvm/test/Analysis/ScalarEvolution/ranges.ll
+++ b/llvm/test/Analysis/ScalarEvolution/ranges.ll
@@ -15,9 +15,9 @@ define i32 @ashr(i32 %a) {
 ; CHECK-NEXT:    --> %ashr U: [0,1) S: [0,1)
 ; CHECK-NEXT:  Determining loop execution counts for: @ashr
 ;
+  %ashr = ashr i32 %a, 31
   %pos = icmp sge i32 %a, 0
   call void @llvm.assume(i1 %pos)
-  %ashr = ashr i32 %a, 31
   ret i32 %ashr
 }
 
@@ -28,9 +28,9 @@ define i32 @shl(i32 %a) {
 ; CHECK-NEXT:    --> (4 * %a) U: [0,-3) S: [-2147483648,2147483645)
 ; CHECK-NEXT:  Determining loop execution counts for: @shl
 ;
-  %pos = icmp slt i32 %a, 1024
-  call void @llvm.assume(i1 %pos)
   %res = shl i32 %a, 2
+  %pos = icmp ult i32 %a, 1024
+  call void @llvm.assume(i1 %pos)
   ret i32 %res
 }
 
@@ -41,9 +41,9 @@ define i32 @lshr(i32 %a) {
 ; CHECK-NEXT:    --> (%a /u -2147483648) U: [0,2) S: [0,2)
 ; CHECK-NEXT:  Determining loop execution counts for: @lshr
 ;
+  %res = lshr i32 %a, 31
   %pos = icmp sge i32 %a, 0
   call void @llvm.assume(i1 %pos)
-  %res = lshr i32 %a, 31
   ret i32 %res
 }
 
@@ -55,34 +55,34 @@ define i32 @udiv(i32 %a) {
 ; CHECK-NEXT:    --> (%a /u -2147483648) U: [0,2) S: [0,2)
 ; CHECK-NEXT:  Determining loop execution counts for: @udiv
 ;
+  %res = udiv i32 %a, 2147483648
   %pos = icmp sge i32 %a, 0
   call void @llvm.assume(i1 %pos)
-  %res = udiv i32 %a, 2147483648
   ret i32 %res
 }
 
-define i64 @sext(i32 %a) {
+define i64 @sext(i8 %a) {
 ; CHECK-LABEL: 'sext'
 ; CHECK-NEXT:  Classifying expressions for: @sext
-; CHECK-NEXT:    %res = sext i32 %a to i64
-; CHECK-NEXT:    --> (sext i32 %a to i64) U: [-2147483648,2147483648) S: [-2147483648,2147483648)
+; CHECK-NEXT:    %res = sext i8 %a to i64
+; CHECK-NEXT:    --> (sext i8 %a to i64) U: [-128,128) S: [-128,128)
 ; CHECK-NEXT:  Determining loop execution counts for: @sext
 ;
-  %pos = icmp sge i32 %a, 0
+  %res = sext i8 %a to i64
+  %pos = icmp sge i8 %a, 0
   call void @llvm.assume(i1 %pos)
-  %res = sext i32 %a to i64
   ret i64 %res
 }
 
-define i64 @zext(i32 %a) {
+define i64 @zext(i8 %a) {
 ; CHECK-LABEL: 'zext'
 ; CHECK-NEXT:  Classifying expressions for: @zext
-; CHECK-NEXT:    %res = zext i32 %a to i64
-; CHECK-NEXT:    --> (zext i32 %a to i64) U: [0,4294967296) S: [0,4294967296)
+; CHECK-NEXT:    %res = zext i8 %a to i64
+; CHECK-NEXT:    --> (zext i8 %a to i64) U: [0,256) S: [0,256)
 ; CHECK-NEXT:  Determining loop execution counts for: @zext
 ;
-  %pos = icmp sge i32 %a, 0
+  %res = zext i8 %a to i64
+  %pos = icmp sge i8 %a, 0
   call void @llvm.assume(i1 %pos)
-  %res = zext i32 %a to i64
   ret i64 %res
 }


        


More information about the llvm-commits mailing list