[llvm-commits] [llvm] r82743 - /llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp

Dan Gohman gohman at apple.com
Thu Sep 24 17:57:30 PDT 2009


Author: djg
Date: Thu Sep 24 19:57:30 2009
New Revision: 82743

URL: http://llvm.org/viewvc/llvm-project?rev=82743&view=rev
Log:
Don't try to use pre-indexed addressing with sthbrx/stwbrx
instructions. This fixes a PowerPC bug exposed by some unrelated
changes I'm working on.

Modified:
    llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp

Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp?rev=82743&r1=82742&r2=82743&view=diff

==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Thu Sep 24 19:57:30 2009
@@ -4921,7 +4921,8 @@
     }
 
     // Turn STORE (BSWAP) -> sthbrx/stwbrx.
-    if (N->getOperand(1).getOpcode() == ISD::BSWAP &&
+    if (cast<StoreSDNode>(N)->isUnindexed() &&
+        N->getOperand(1).getOpcode() == ISD::BSWAP &&
         N->getOperand(1).getNode()->hasOneUse() &&
         (N->getOperand(1).getValueType() == MVT::i32 ||
          N->getOperand(1).getValueType() == MVT::i16)) {





More information about the llvm-commits mailing list