mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
If fast-isel fails, remove dead instructions generated during the failed
attempt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145425 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
23
test/CodeGen/ARM/fast-isel-deadcode.ll
Normal file
23
test/CodeGen/ARM/fast-isel-deadcode.ll
Normal file
@@ -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)
|
Reference in New Issue
Block a user