mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-05 14:34:55 +00:00
Add an easy microoptimization I noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43164 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
95cf196d15
commit
3a7c33a853
@ -573,3 +573,22 @@ __Z11no_overflowjj:
|
|||||||
bx lr
|
bx lr
|
||||||
|
|
||||||
//===---------------------------------------------------------------------===//
|
//===---------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
Easy ARM microoptimization (with -mattr=+vfp2):
|
||||||
|
|
||||||
|
define i64 @i(double %X) {
|
||||||
|
%Y = bitcast double %X to i64
|
||||||
|
ret i64 %Y
|
||||||
|
}
|
||||||
|
|
||||||
|
compiles into:
|
||||||
|
|
||||||
|
_i:
|
||||||
|
fmdrr d0, r0, r1
|
||||||
|
fmrrd r0, r1, d0
|
||||||
|
bx lr
|
||||||
|
|
||||||
|
This just needs a target-specific dag combine to merge the two ARMISD nodes.
|
||||||
|
|
||||||
|
|
||||||
|
//===---------------------------------------------------------------------===//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user