mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Avoid storing and reloading zeros and other constants from stack slots
by flagging the associated instructions as being trivially rematerializable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41775 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
14
test/CodeGen/X86/zero-remat.ll
Normal file
14
test/CodeGen/X86/zero-remat.ll
Normal file
@@ -0,0 +1,14 @@
|
||||
; RUN: llvm-as < %s | llc -march=x86-64 | grep xor | count 4
|
||||
; RUN: llvm-as < %s | llc -march=x86-64 -stats -info-output-file - | grep asm-printer | grep 12
|
||||
|
||||
declare void @bar(double %x)
|
||||
declare void @barf(float %x)
|
||||
|
||||
define double @foo() {
|
||||
call void @bar(double 0.0)
|
||||
ret double 0.0
|
||||
}
|
||||
define float @foof() {
|
||||
call void @barf(float 0.0)
|
||||
ret float 0.0
|
||||
}
|
Reference in New Issue
Block a user