aboutsummaryrefslogtreecommitdiffhomepage
path: root/interp/testdata/revert.ll
diff options
context:
space:
mode:
Diffstat (limited to 'interp/testdata/revert.ll')
-rw-r--r--interp/testdata/revert.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/interp/testdata/revert.ll b/interp/testdata/revert.ll
index 41fb6a81e..d2b3007dd 100644
--- a/interp/testdata/revert.ll
+++ b/interp/testdata/revert.ll
@@ -5,9 +5,12 @@ declare void @externalCall(i64)
@foo.knownAtRuntime = global i64 0
@bar.knownAtRuntime = global i64 0
[email protected] = external global [3 x {i64, i32}]
[email protected] = global i32 0
define void @runtime.initAll() unnamed_addr {
entry:
+ call void @baz.init(i8* undef, i8* undef)
call void @foo.init(i8* undef, i8* undef)
call void @bar.init(i8* undef, i8* undef)
call void @main.init(i8* undef, i8* undef)
@@ -25,6 +28,14 @@ define internal void @bar.init(i8* %context, i8* %parentHandle) unnamed_addr {
ret void
}
+define internal void @baz.init(i8* %context, i8* %parentHandle) unnamed_addr {
+ ; Test extractvalue/insertvalue with more than one index.
+ %val = load [3 x {i64, i32}], [3 x {i64, i32}]* @baz.someGlobal
+ %part = extractvalue [3 x {i64, i32}] %val, 0, 1
+ %val2 = insertvalue [3 x {i64, i32}] %val, i32 5, 2, 1
+ unreachable ; trigger revert
+}
+
define internal void @main.init(i8* %context, i8* %parentHandle) unnamed_addr {
entry:
call void @externalCall(i64 3)