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:
Chris Lattner 2007-10-19 03:29:26 +00:00
parent 95cf196d15
commit 3a7c33a853

View File

@ -573,3 +573,22 @@ __Z11no_overflowjj:
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.
//===---------------------------------------------------------------------===//