forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Teach TBAA analysis to report errors on cyclic TBAA metadata rather t…
…han hanging. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232144 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
2 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
; RUN: not opt -instcombine < %s 2>&1 | FileCheck %s | ||
; CHECK: Cycle found in TBAA metadata. | ||
|
||
define void @test6(i32* %gi) #0 { | ||
entry: | ||
store i32 42, i32* %gi, align 4, !tbaa !0 | ||
br label %for.cond | ||
|
||
for.cond: ; preds = %for.body, %entry | ||
br i1 undef, label %for.body, label %for.end | ||
|
||
for.body: ; preds = %for.cond | ||
store i32 undef, i32* %gi, align 4, !tbaa !2 | ||
br label %for.cond | ||
|
||
for.end: ; preds = %for.cond | ||
ret void | ||
} | ||
|
||
attributes #0 = { nounwind ssp uwtable } | ||
|
||
!0 = !{!1, !1, i64 0} | ||
!1 = !{!"Simple C/C++ TBAA"} | ||
!2 = distinct !{!3, !2, i64 0} | ||
!3 = !{!"int", !4} | ||
!4 = !{!"omnipotent ", !1} |