Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/Transforms/JumpThreading/thread-loads.ll
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | |||||
; as necessary in the predecessors. This is especially tricky because the same | ; as necessary in the predecessors. This is especially tricky because the same | ||||
; predecessor ends up with two entries in the PHI node and they must share | ; predecessor ends up with two entries in the PHI node and they must share | ||||
; a single cast. | ; a single cast. | ||||
; CHECK-LABEL: @test3( | ; CHECK-LABEL: @test3( | ||||
; CHECK-NEXT: entry: | ; CHECK-NEXT: entry: | ||||
; CHECK-NEXT: [[TMP0:%.*]] = bitcast i8** [[X:%.*]] to i32** | ; CHECK-NEXT: [[TMP0:%.*]] = bitcast i8** [[X:%.*]] to i32** | ||||
; CHECK-NEXT: [[TMP1:%.*]] = load i32*, i32** [[TMP0]], align 8 | ; CHECK-NEXT: [[TMP1:%.*]] = load i32*, i32** [[TMP0]], align 8 | ||||
; CHECK-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP1]] to i8* | ; CHECK-NEXT: [[TMP2:%.*]] = bitcast i32* [[TMP1]] to i8* | ||||
; CHECK-NEXT: br i1 [[F:%.*]], label [[IF_END57:%.*]], label [[IF_END57]] | ; CHECK-NEXT: br i1 [[F:%.*]], label [[IF_END57:%.*]], label [[IF_THEN56:%.*]] | ||||
; CHECK: if.then56: | |||||
; CHECK-NEXT: [[TMP3:%.*]] = bitcast i32* [[TMP1]] to i8* | |||||
; CHECK-NEXT: br label [[IF_END57]] | |||||
; CHECK: if.end57: | ; CHECK: if.end57: | ||||
; CHECK-NEXT: [[TMP3:%.*]] = phi i8* [ [[TMP2]], [[ENTRY:%.*]] ], [ [[TMP2]], [[ENTRY]] ] | ; CHECK-NEXT: [[TMP4:%.*]] = phi i8* [ [[TMP3]], [[IF_THEN56]] ], [ [[TMP2]], [[ENTRY:%.*]] ] | ||||
; CHECK-NEXT: [[TOBOOL59:%.*]] = icmp eq i8* [[TMP3]], null | ; CHECK-NEXT: [[TOBOOL59:%.*]] = icmp eq i8* [[TMP4]], null | ||||
; CHECK-NEXT: br i1 [[TOBOOL59]], label [[RETURN:%.*]], label [[IF_THEN60:%.*]] | ; CHECK-NEXT: br i1 [[TOBOOL59]], label [[RETURN:%.*]], label [[IF_THEN60:%.*]] | ||||
; CHECK: if.then60: | ; CHECK: if.then60: | ||||
; CHECK-NEXT: ret i32 42 | ; CHECK-NEXT: ret i32 42 | ||||
; CHECK: return: | ; CHECK: return: | ||||
; CHECK-NEXT: ret i32 13 | ; CHECK-NEXT: ret i32 13 | ||||
; | ; | ||||
entry: | entry: | ||||
%0 = bitcast i8** %x to i32** | %0 = bitcast i8** %x to i32** | ||||
▲ Show 20 Lines • Show All 552 Lines • ▼ Show 20 Lines | |||||
left_x: | left_x: | ||||
ret i32 20 | ret i32 20 | ||||
right_x: | right_x: | ||||
ret i32 10 | ret i32 10 | ||||
} | } | ||||
; CHECK: [[RNG4]] = !{i32 0, i32 1} | |||||
!0 = !{!3, !3, i64 0} | !0 = !{!3, !3, i64 0} | ||||
!1 = !{!"omnipotent char", !2} | !1 = !{!"omnipotent char", !2} | ||||
!2 = !{!"Simple C/C++ TBAA"} | !2 = !{!"Simple C/C++ TBAA"} | ||||
!3 = !{!"int", !1} | !3 = !{!"int", !1} | ||||
!4 = !{ i32 0, i32 1 } | !4 = !{ i32 0, i32 1 } | ||||
!5 = !{ i32 8, i32 10 } | !5 = !{ i32 8, i32 10 } | ||||
!6 = !{!6} | !6 = !{!6} | ||||
!7 = !{!7, !6} | !7 = !{!7, !6} | ||||
!8 = !{!8, !6} | !8 = !{!8, !6} | ||||
!9 = !{!7} | !9 = !{!7} | ||||
!10 = !{!8} | !10 = !{!8} |