-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Revert "[Support] Assert that DomTree nodes share parent" (#1…
- Loading branch information
1 parent
3c3df1b
commit 2218df4
Showing
5 changed files
with
44 additions
and
2 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
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
33 changes: 33 additions & 0 deletions
33
llvm/test/Transforms/AlignmentFromAssumptions/domtree-crash.ll
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,33 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 | ||
; RUN: opt -passes=alignment-from-assumptions -S < %s | FileCheck %s | ||
|
||
; The alignment assumption is a global, which has users in a different | ||
; function. Test that in this case the dominator tree is only queried with | ||
; blocks from the same function. | ||
|
||
@global = external constant [192 x i8] | ||
|
||
define void @fn1() { | ||
; CHECK-LABEL: define void @fn1() { | ||
; CHECK-NEXT: call void @llvm.assume(i1 false) [ "align"(ptr @global, i64 1) ] | ||
; CHECK-NEXT: ret void | ||
; | ||
call void @llvm.assume(i1 false) [ "align"(ptr @global, i64 1) ] | ||
ret void | ||
} | ||
|
||
define void @fn2() { | ||
; CHECK-LABEL: define void @fn2() { | ||
; CHECK-NEXT: ret void | ||
; CHECK: [[LOOP:.*]]: | ||
; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i8, ptr @global, i64 0 | ||
; CHECK-NEXT: [[LOAD:%.*]] = load i64, ptr [[GEP]], align 1 | ||
; CHECK-NEXT: br label %[[LOOP]] | ||
; | ||
ret void | ||
|
||
loop: | ||
%gep = getelementptr inbounds i8, ptr @global, i64 0 | ||
%load = load i64, ptr %gep, align 1 | ||
br label %loop | ||
} |