Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BasicAA] Convert some tests to opaque pointers (NFC)
- Loading branch information
Showing
14 changed files
with
305 additions
and
319 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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
; RUN: opt < %s -aa-pipeline=basic-aa -passes=dse -S | FileCheck %s | ||
|
||
define void @test({i32,i32 }* %P) { | ||
; CHECK: store i32 0, i32* %X | ||
%Q = getelementptr {i32,i32}, {i32,i32}* %P, i32 1 | ||
%X = getelementptr {i32,i32}, {i32,i32}* %Q, i32 0, i32 1 | ||
%Y = getelementptr {i32,i32}, {i32,i32}* %Q, i32 1, i32 1 | ||
store i32 0, i32* %X | ||
store i32 1, i32* %Y | ||
define void @test(ptr %P) { | ||
; CHECK: store i32 0, ptr %X | ||
%Q = getelementptr {i32,i32}, ptr %P, i32 1 | ||
%X = getelementptr {i32,i32}, ptr %Q, i32 0, i32 1 | ||
%Y = getelementptr {i32,i32}, ptr %Q, i32 1, i32 1 | ||
store i32 0, ptr %X | ||
store i32 1, ptr %Y | ||
ret void | ||
} |
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
; RUN: opt < %s -aa-pipeline=basic-aa -passes=gvn -S | FileCheck %s | ||
|
||
declare noalias i32* @noalias() | ||
declare noalias ptr @noalias() | ||
|
||
define i32 @test(i32 %x) { | ||
; CHECK: load i32, i32* %a | ||
%a = call i32* @noalias() | ||
store i32 1, i32* %a | ||
%b = getelementptr i32, i32* %a, i32 %x | ||
store i32 2, i32* %b | ||
; CHECK: load i32, ptr %a | ||
%a = call ptr @noalias() | ||
store i32 1, ptr %a | ||
%b = getelementptr i32, ptr %a, i32 %x | ||
store i32 2, ptr %b | ||
|
||
%c = load i32, i32* %a | ||
%c = load i32, ptr %a | ||
ret i32 %c | ||
} |
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
Oops, something went wrong.