diff options
author | Alex Lorenz <arphaman@gmail.com> | 2015-08-10 21:27:03 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2015-08-10 21:27:03 +0000 |
commit | 2f43dd5a1266c613d577fc7b35ea46509275e6fa (patch) | |
tree | 7741caf633f77c585fd717be5a1c2944ca443ec1 /llvm/test/CodeGen/PowerPC/stackmap-frame-setup.ll | |
parent | 0f2517314a5c5f954024899506134d8b740c5863 (diff) | |
download | bcm5719-llvm-2f43dd5a1266c613d577fc7b35ea46509275e6fa.tar.gz bcm5719-llvm-2f43dd5a1266c613d577fc7b35ea46509275e6fa.zip |
StackMap: FastISel: Add an appropriate number of immediate operands to the
frame setup instruction.
This commit ensures that the stack map lowering code in FastISel adds an
appropriate number of immediate operands to the frame setup instruction.
The previous code added just one immediate operand, which was fine for a target
like AArch64, but on X86 the ADJCALLSTACKDOWN64 instruction needs two explicit
operands. This caused the machine verifier to report an error when the old code
added just one.
Reviewers: Juergen Ributzka
Differential Revision: http://reviews.llvm.org/D11853
llvm-svn: 244508
Diffstat (limited to 'llvm/test/CodeGen/PowerPC/stackmap-frame-setup.ll')
-rw-r--r-- | llvm/test/CodeGen/PowerPC/stackmap-frame-setup.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PowerPC/stackmap-frame-setup.ll b/llvm/test/CodeGen/PowerPC/stackmap-frame-setup.ll new file mode 100644 index 00000000000..487da00faa1 --- /dev/null +++ b/llvm/test/CodeGen/PowerPC/stackmap-frame-setup.ll @@ -0,0 +1,20 @@ +; RUN: llc -o /dev/null -verify-machineinstrs -mtriple=powerpc64-unknown-gnu-linux -stop-after machine-sink %s | FileCheck %s --check-prefix=ISEL +; RUN: llc -o /dev/null -verify-machineinstrs -mtriple=powerpc64-unknown-gnu-linux -fast-isel -fast-isel-abort=1 -stop-after machine-sink %s | FileCheck %s --check-prefix=FAST-ISEL + +define void @caller_meta_leaf() { +entry: + %metadata = alloca i64, i32 3, align 8 + store i64 11, i64* %metadata + store i64 12, i64* %metadata + store i64 13, i64* %metadata +; ISEL: ADJCALLSTACKDOWN 0, implicit-def +; ISEL-NEXT: STACKMAP +; ISEL-NEXT: ADJCALLSTACKUP 0, 0, implicit-def + call void (i64, i32, ...) @llvm.experimental.stackmap(i64 4, i32 0, i64* %metadata) +; FAST-ISEL: ADJCALLSTACKDOWN 0, implicit-def +; FAST-ISEL-NEXT: STACKMAP +; FAST-ISEL-NEXT: ADJCALLSTACKUP 0, 0, implicit-def + ret void +} + +declare void @llvm.experimental.stackmap(i64, i32, ...) |