aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Alpha/README.txt
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/Alpha/README.txt')
-rw-r--r--lib/Target/Alpha/README.txt33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/Target/Alpha/README.txt b/lib/Target/Alpha/README.txt
new file mode 100644
index 0000000..2d1909a
--- /dev/null
+++ b/lib/Target/Alpha/README.txt
@@ -0,0 +1,33 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Fix Ordered/Unordered FP stuff
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+improve bytezap opertunities
+ulong %foo(ulong %y) {
+entry:
+ %tmp = and ulong %y, 65535
+ %tmp2 = shr ulong %tmp, ubyte 3
+ ret ulong %tmp2
+}
+
+
+compiles to a 3 instruction sequence without instcombine
+ zapnot $16,3,$0
+ srl $0,3,$0
+ ret $31,($26),1
+
+After instcombine you get
+ulong %foo(ulong %y) {
+entry:
+ %tmp = shr ulong %y, ubyte 3 ; <ulong> [#uses=1]
+ %tmp2 = and ulong %tmp, 8191 ; <ulong> [#uses=1]
+ ret ulong %tmp2
+}
+
+which compiles to
+ lda $0,8191($31)
+ srl $16,3,$1
+ and $1,$0,$0
+ ret $31,($26),1
+