Add an easy microoptimization I noticed.
authorChris Lattner <sabre@nondot.org>
Fri, 19 Oct 2007 03:29:26 +0000 (03:29 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 19 Oct 2007 03:29:26 +0000 (03:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43164 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/README.txt

index f05ae1c4230493d7710a22af7c9a8bcc3ed3d913..1fb775064efeebdbaef3db483fd5852a90043494 100644 (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.
+
+
+//===---------------------------------------------------------------------===//