[llvm-commits] [llvm] r155190 - /llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp
Timur Iskhodzhanov
timurrrr at google.com
Fri Apr 20 04:20:42 PDT 2012
Hi Gabor,
Do these new failures look related to your change?
http://lab.llvm.org:8011/builders/llvm-i686-debian/builds/2782
http://lab.llvm.org:8011/builders/llvm-x86_64-linux/builds/4324
--
Timur
On Fri, Apr 20, 2012 at 12:58 PM, Gabor Greif <ggreif at gmail.com> wrote:
> Author: ggreif
> Date: Fri Apr 20 03:58:49 2012
> New Revision: 155190
>
> URL: http://llvm.org/viewvc/llvm-project?rev=155190&view=rev
> Log:
> fix obviously bogus (IMO) operand index of the load in asserts
> (load only has one operand) and smuggle in some whitespace changes too
>
> NB: I am obviously testing the water here, and believe that the unguarded
> cast is still wrong, but why is the getZExtValue of the load's operand
> tested against zero here? Any review is appreciated.
>
> 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=155190&r1=155189&r2=155190&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp (original)
> +++ llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Fri Apr 20 03:58:49 2012
> @@ -902,7 +902,7 @@
> return true; // [r+i]
> } else if (N.getOperand(1).getOpcode() == PPCISD::Lo) {
> // Match LOAD (ADD (X, Lo(G))).
> - assert(!cast<ConstantSDNode>(N.getOperand(1).getOperand(1))->getZExtValue()
> + assert(!cast<ConstantSDNode>(N.getOperand(1).getOperand(0))->getZExtValue()
> && "Cannot handle constant offsets yet!");
> Disp = N.getOperand(1).getOperand(0); // The global address.
> assert(Disp.getOpcode() == ISD::TargetGlobalAddress ||
> @@ -1006,7 +1006,7 @@
> if (N.getOpcode() == ISD::ADD) {
> short imm = 0;
> if (isIntS16Immediate(N.getOperand(1), imm) && (imm & 3) == 0) {
> - Disp = DAG.getTargetConstant(((int)imm & 0xFFFF) >> 2, MVT::i32);
> + Disp = DAG.getTargetConstant(((int)imm & 0xFFFF) >> 2, MVT::i32);
> if (FrameIndexSDNode *FI = dyn_cast<FrameIndexSDNode>(N.getOperand(0))) {
> Base = DAG.getTargetFrameIndex(FI->getIndex(), N.getValueType());
> } else {
> @@ -1015,7 +1015,7 @@
> return true; // [r+i]
> } else if (N.getOperand(1).getOpcode() == PPCISD::Lo) {
> // Match LOAD (ADD (X, Lo(G))).
> - assert(!cast<ConstantSDNode>(N.getOperand(1).getOperand(1))->getZExtValue()
> + assert(!cast<ConstantSDNode>(N.getOperand(1).getOperand(0))->getZExtValue()
> && "Cannot handle constant offsets yet!");
> Disp = N.getOperand(1).getOperand(0); // The global address.
> assert(Disp.getOpcode() == ISD::TargetGlobalAddress ||
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list