File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
llvm/test/Transforms/CorrelatedValuePropagation Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1910,6 +1910,21 @@ exit:
1910
1910
ret i1 false
1911
1911
}
1912
1912
1913
+ define i1 @binop_eval_order (i32 %x ) {
1914
+ ; CHECK-LABEL: @binop_eval_order(
1915
+ ; CHECK-NEXT: [[A:%.*]] = add nuw nsw i32 [[X:%.*]], 1
1916
+ ; CHECK-NEXT: [[B:%.*]] = add nuw nsw i32 [[A]], 1
1917
+ ; CHECK-NEXT: [[C:%.*]] = add nuw nsw i32 [[A]], [[B]]
1918
+ ; CHECK-NEXT: [[D:%.*]] = icmp ugt i32 [[C]], 2
1919
+ ; CHECK-NEXT: ret i1 [[D]]
1920
+ ;
1921
+ %a = add nuw nsw i32 %x , 1
1922
+ %b = add nuw nsw i32 %a , 1
1923
+ %c = add nuw nsw i32 %a , %b
1924
+ %d = icmp ugt i32 %c , 2
1925
+ ret i1 %d
1926
+ }
1927
+
1913
1928
declare i32 @llvm.uadd.sat.i32 (i32 , i32 )
1914
1929
declare i32 @llvm.usub.sat.i32 (i32 , i32 )
1915
1930
declare i32 @llvm.sadd.sat.i32 (i32 , i32 )
You can’t perform that action at this time.
0 commit comments