File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
llvm/test/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -2025,6 +2025,33 @@ define i8 @simplifydemanded_context(i8 %x, i8 %y) {
2025
2025
ret i8 %and2
2026
2026
}
2027
2027
2028
+ ; FIXME: This is a miscompile.
2029
+ define i16 @pr97330 (i1 %c , ptr %p1 , ptr %p2 ) {
2030
+ ; CHECK-LABEL: @pr97330(
2031
+ ; CHECK-NEXT: entry:
2032
+ ; CHECK-NEXT: br i1 [[C:%.*]], label [[EXIT:%.*]], label [[IF:%.*]]
2033
+ ; CHECK: if:
2034
+ ; CHECK-NEXT: unreachable
2035
+ ; CHECK: exit:
2036
+ ; CHECK-NEXT: ret i16 1
2037
+ ;
2038
+ entry:
2039
+ %v = load i64 , ptr %p1 , align 8
2040
+ %conv = trunc i64 %v to i16
2041
+ br i1 %c , label %exit , label %if
2042
+
2043
+ if:
2044
+ %cmp = icmp ne i16 %conv , 1
2045
+ %conv2 = zext i1 %cmp to i32
2046
+ store i32 %conv2 , ptr %p2 , align 4
2047
+ %cmp2 = icmp eq i64 %v , 1
2048
+ call void @llvm.assume (i1 %cmp2 )
2049
+ unreachable
2050
+
2051
+ exit:
2052
+ ret i16 %conv
2053
+ }
2054
+
2028
2055
declare void @dummy ()
2029
2056
declare void @use (i1 )
2030
2057
declare void @sink (i8 )
You can’t perform that action at this time.
0 commit comments