File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
llvm/test/Transforms/CorrelatedValuePropagation Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -946,5 +946,19 @@ define i1 @intrinsic_range(i16 %x) {
946
946
ret i1 %res
947
947
}
948
948
949
+ define i1 @supported_intrinsic_range (i16 %x ) {
950
+ ; CHECK-LABEL: @supported_intrinsic_range(
951
+ ; CHECK-NEXT: [[ABS:%.*]] = call i16 @llvm.abs.i16(i16 [[X:%.*]], i1 false), !range [[RNG5]]
952
+ ; CHECK-NEXT: [[TRUNC:%.*]] = trunc i16 [[ABS]] to i8
953
+ ; CHECK-NEXT: [[RES:%.*]] = icmp ult i8 [[TRUNC]], 8
954
+ ; CHECK-NEXT: ret i1 [[RES]]
955
+ ;
956
+ %abs = call i16 @llvm.abs.i16 (i16 %x , i1 false ), !range !{i16 0 , i16 8 }
957
+ %trunc = trunc i16 %abs to i8
958
+ %res = icmp ult i8 %trunc , 8
959
+ ret i1 %res
960
+ }
961
+
949
962
declare i16 @llvm.ctlz.i16 (i16 , i1 )
963
+ declare i16 @llvm.abs.i16 (i16 , i1 )
950
964
declare void @llvm.assume (i1 )
You can’t perform that action at this time.
0 commit comments