diff options
author | Chad Rosier <mcrosier@apple.com> | 2011-11-29 19:40:47 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2011-11-29 19:40:47 +0000 |
commit | 46addb9e07c745525164a2239dc7502b0e3ae2a3 (patch) | |
tree | cf14cf649655e11af4f8cbbd207fb1605c5811e9 /llvm/test/CodeGen/ARM/fast-isel-deadcode.ll | |
parent | cfe4ff9725c8f42f14627f6da433cf0b3fdcfcff (diff) | |
download | bcm5719-llvm-46addb9e07c745525164a2239dc7502b0e3ae2a3.tar.gz bcm5719-llvm-46addb9e07c745525164a2239dc7502b0e3ae2a3.zip |
If fast-isel fails, remove dead instructions generated during the failed
attempt.
llvm-svn: 145425
Diffstat (limited to 'llvm/test/CodeGen/ARM/fast-isel-deadcode.ll')
-rw-r--r-- | llvm/test/CodeGen/ARM/fast-isel-deadcode.ll | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/fast-isel-deadcode.ll b/llvm/test/CodeGen/ARM/fast-isel-deadcode.ll new file mode 100644 index 00000000000..028d94014fe --- /dev/null +++ b/llvm/test/CodeGen/ARM/fast-isel-deadcode.ll @@ -0,0 +1,23 @@ +; RUN: llc < %s -O0 -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-darwin | FileCheck %s --check-prefix=THUMB + +; Target-specific selector can't properly handle the double because it isn't +; being passed via a register, so the materialized arguments become dead code. + +define i32 @main(i32 %argc, i8** %argv) nounwind { +entry: +; THUMB: main + call void @printArgsNoRet(i32 1, float 0x4000CCCCC0000000, i8 signext 99, double 4.100000e+00) +; THUMB: blx _printArgsNoRet +; THUMB-NOT: ldr +; THUMB-NOT: vldr +; THUMB-NOT: vmov +; THUMB-NOT: ldr +; THUMB-NOT: sxtb +; THUMB: movs r0, #0 +; THUMB: movt r0, #0 +; THUMB: add sp, #32 +; THUMb: pop {r7, pc} + ret i32 0 +} + +declare void @printArgsNoRet(i32 %a1, float %a2, i8 signext %a3, double %a4) |