diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:44:32 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:44:32 +0000 |
commit | 5a5ac124e1efaf208671f01c46edb15f29ed2a0b (patch) | |
tree | a6140557876943cdd800ee997c9317283394b22c /test/CodeGen/X86/tailcall-64.ll | |
parent | f03b5bed27d0d2eafd68562ce14f8b5e3f1f0801 (diff) | |
download | src-5a5ac124e1efaf208671f01c46edb15f29ed2a0b.tar.gz src-5a5ac124e1efaf208671f01c46edb15f29ed2a0b.zip |
Notes
Diffstat (limited to 'test/CodeGen/X86/tailcall-64.ll')
-rw-r--r-- | test/CodeGen/X86/tailcall-64.ll | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/CodeGen/X86/tailcall-64.ll b/test/CodeGen/X86/tailcall-64.ll index deab1dcc7eb9..9e054fea5b35 100644 --- a/test/CodeGen/X86/tailcall-64.ll +++ b/test/CodeGen/X86/tailcall-64.ll @@ -165,7 +165,7 @@ declare %struct.B* @testu() define %struct.A* @test_upcast() { entry: %A = tail call %struct.B* @testu() - %x = getelementptr inbounds %struct.B* %A, i32 0, i32 0 + %x = getelementptr inbounds %struct.B, %struct.B* %A, i32 0, i32 0 ret %struct.A* %x } @@ -182,13 +182,13 @@ define { i64, i64 } @crash(i8* %this) { ; Check that we can fold an indexed load into a tail call instruction. ; CHECK: fold_indexed_load ; CHECK: leaq (%rsi,%rsi,4), %[[RAX:r..]] -; CHECK: jmpq *16(%{{r..}},%[[RAX]],8) # TAILCALL +; CHECK: jmpq *16(%{{r..}},%[[RAX]],8) ## TAILCALL %struct.funcs = type { i32 (i8*, i32*, i32)*, i32 (i8*)*, i32 (i8*)*, i32 (i8*, i32)*, i32 } @func_table = external global [0 x %struct.funcs] define void @fold_indexed_load(i8* %mbstr, i64 %idxprom) nounwind uwtable ssp { entry: - %dsplen = getelementptr inbounds [0 x %struct.funcs]* @func_table, i64 0, i64 %idxprom, i32 2 - %x1 = load i32 (i8*)** %dsplen, align 8 + %dsplen = getelementptr inbounds [0 x %struct.funcs], [0 x %struct.funcs]* @func_table, i64 0, i64 %idxprom, i32 2 + %x1 = load i32 (i8*)*, i32 (i8*)** %dsplen, align 8 %call = tail call i32 %x1(i8* %mbstr) nounwind ret void } @@ -207,15 +207,15 @@ entry: ; } ; ; CHECK-LABEL: rdar12282281 -; CHECK: jmpq *%r11 # TAILCALL +; CHECK: jmpq *%r11 ## TAILCALL @funcs = external constant [0 x i32 (i8*, ...)*] define i32 @rdar12282281(i32 %n) nounwind uwtable ssp { entry: %idxprom = sext i32 %n to i64 - %arrayidx = getelementptr inbounds [0 x i32 (i8*, ...)*]* @funcs, i64 0, i64 %idxprom - %0 = load i32 (i8*, ...)** %arrayidx, align 8 - %call = tail call i32 (i8*, ...)* %0(i8* null, i32 0, i32 0, i32 0, i32 0, i32 0) nounwind + %arrayidx = getelementptr inbounds [0 x i32 (i8*, ...)*], [0 x i32 (i8*, ...)*]* @funcs, i64 0, i64 %idxprom + %0 = load i32 (i8*, ...)*, i32 (i8*, ...)** %arrayidx, align 8 + %call = tail call i32 (i8*, ...) %0(i8* null, i32 0, i32 0, i32 0, i32 0, i32 0) nounwind ret i32 %call } |