-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disasm-test: Add opaque pointer test cases
See #177.
- Loading branch information
1 parent
1441a8f
commit 882aa84
Showing
8 changed files
with
48 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
define void @atomicrmw(ptr %a, i32 %i) { | ||
%b = atomicrmw add ptr %a, i32 %i acquire | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
SKIP_TEST | ||
|
||
This test case requires the use of opaque pointers, which are most easily | ||
usable with LLVM 15 or later. |
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,11 @@ | ||
define void @f(i32 %x) { | ||
ret void | ||
} | ||
|
||
define void @g() { | ||
%p = alloca ptr | ||
store ptr @f, ptr %p | ||
%f = load ptr, ptr %p | ||
call void (i32) %f(i32 42) | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
SKIP_TEST | ||
|
||
This test case requires the use of opaque pointers, which are most easily | ||
usable with LLVM 15 or later. |
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,9 @@ | ||
%struct.RT = type { i8, [10 x [20 x i32]], i8 } | ||
%struct.ST = type { i32, double, %struct.RT } | ||
|
||
@.s = private constant %struct.ST zeroinitializer | ||
|
||
define ptr @foo() { | ||
entry: | ||
ret ptr getelementptr inbounds (%struct.ST, ptr @.s, i64 1, i32 2, i32 1, i64 5, i64 13) | ||
} |
4 changes: 4 additions & 0 deletions
4
disasm-test/tests/opaque-constant-getelementptr.pre-llvm15.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,4 @@ | ||
SKIP_TEST | ||
|
||
This test case requires the use of opaque pointers, which are most easily | ||
usable with LLVM 15 or later. |
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,8 @@ | ||
%struct.RT = type { i8, [10 x [20 x i32]], i8 } | ||
%struct.ST = type { i32, double, %struct.RT } | ||
|
||
define ptr @foo(ptr %s) { | ||
entry: | ||
%arrayidx = getelementptr inbounds %struct.ST, ptr %s, i64 1, i32 2, i32 1, i64 5, i64 13 | ||
ret ptr %arrayidx | ||
} |
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,4 @@ | ||
SKIP_TEST | ||
|
||
This test case requires the use of opaque pointers, which are most easily | ||
usable with LLVM 15 or later. |