summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/README.txt
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-05-05 05:36:15 +0000
committerChris Lattner <sabre@nondot.org>2006-05-05 05:36:15 +0000
commit55c63257f31e2fa0b4a606f15d809cf615bc960c (patch)
tree72b59759009232c2d2744bda2ffbcd77b6f0b604 /lib/Target/PowerPC/README.txt
parent4b75e73791f32f73ca1fc91f073a5126e6700b7a (diff)
downloadllvm-55c63257f31e2fa0b4a606f15d809cf615bc960c.tar.gz
llvm-55c63257f31e2fa0b4a606f15d809cf615bc960c.tar.bz2
llvm-55c63257f31e2fa0b4a606f15d809cf615bc960c.tar.xz
New note, Nate, please check to see if I'm full of it :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28118 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/README.txt')
-rw-r--r--lib/Target/PowerPC/README.txt33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/README.txt b/lib/Target/PowerPC/README.txt
index 6b3988dfb9..bbe311cb38 100644
--- a/lib/Target/PowerPC/README.txt
+++ b/lib/Target/PowerPC/README.txt
@@ -559,3 +559,36 @@ transformation, good for PI. See PPCISelLowering.cpp, this comment:
// need to flag these together so that the value isn't live across a call.
//setOperationAction(ISD::SINT_TO_FP, MVT::i32, Custom);
+===-------------------------------------------------------------------------===
+
+Another missed rlwimi case:
+
+void %foo(uint *%tmp) {
+ %tmp = load uint* %tmp ; <uint> [#uses=3]
+ %tmp1 = shr uint %tmp, ubyte 31 ; <uint> [#uses=1]
+ %tmp1 = cast uint %tmp1 to ubyte ; <ubyte> [#uses=1]
+ %tmp4.mask = shr uint %tmp, ubyte 30 ; <uint> [#uses=1]
+ %tmp4.mask = cast uint %tmp4.mask to ubyte ; <ubyte> [#uses=1]
+ %tmp = or ubyte %tmp4.mask, %tmp1 ; <ubyte> [#uses=1]
+ %tmp10 = cast ubyte %tmp to uint ; <uint> [#uses=1]
+ %tmp11 = shl uint %tmp10, ubyte 31 ; <uint> [#uses=1]
+ %tmp12 = and uint %tmp, 2147483647 ; <uint> [#uses=1]
+ %tmp13 = or uint %tmp11, %tmp12 ; <uint> [#uses=1]
+ store uint %tmp13, uint* %tmp
+ ret void
+}
+
+We emit:
+
+_foo:
+ lwz r2, 0(r3)
+ srwi r4, r2, 30
+ srwi r5, r2, 31
+ or r4, r4, r5
+ slwi r4, r4, 31
+ rlwimi r4, r2, 0, 1, 31
+ stw r4, 0(r3)
+ blr
+
+I *think* that could use another rlwimi.
+