Disable load width reduction xform of variant (zext (truncate load x)) for
authorEvan Cheng <evan.cheng@apple.com>
Thu, 29 Mar 2007 07:56:46 +0000 (07:56 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Thu, 29 Mar 2007 07:56:46 +0000 (07:56 +0000)
big endian targets until llvm-gcc build issue has been resolved.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35449 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index 8f90521074c6250d66b504c60c873ad06224bdea..bd3ad3f812d67b04c1de8b2f773dc4c87fe5696e 100644 (file)
@@ -2110,7 +2110,9 @@ SDOperand DAGCombiner::visitZERO_EXTEND(SDNode *N) {
 
   // fold (zext (truncate (load x))) -> (zext (smaller load x))
   // fold (zext (truncate (srl (load x), c))) -> (zext (small load (x+c/n)))
-  if (N0.getOpcode() == ISD::TRUNCATE) {
+  // FIXME: Temporarily disable this for big endian machines until llvm-gcc
+  // build issue has been resolved.
+  if (TLI.isLittleEndian() && N0.getOpcode() == ISD::TRUNCATE) {
     SDOperand NarrowLoad = ReduceLoadWidth(N0.Val);
     if (NarrowLoad.Val) {
       if (NarrowLoad.Val != N0.Val)