Index: llvm/trunk/include/llvm/CodeGen/TargetLowering.h =================================================================== --- llvm/trunk/include/llvm/CodeGen/TargetLowering.h +++ llvm/trunk/include/llvm/CodeGen/TargetLowering.h @@ -73,6 +73,7 @@ class FastISel; class FunctionLoweringInfo; class GlobalValue; +class GISelKnownBits; class IntrinsicInst; struct KnownBits; class LLVMContext; @@ -3167,7 +3168,8 @@ /// or one and return them in the KnownZero/KnownOne bitsets. The DemandedElts /// argument allows us to only collect the known bits that are shared by the /// requested vector elements. This is for GISel. - virtual void computeKnownBitsForTargetInstr(Register R, KnownBits &Known, + virtual void computeKnownBitsForTargetInstr(GISelKnownBits &Analysis, + Register R, KnownBits &Known, const APInt &DemandedElts, const MachineRegisterInfo &MRI, unsigned Depth = 0) const; Index: llvm/trunk/lib/CodeGen/GlobalISel/GISelKnownBits.cpp =================================================================== --- llvm/trunk/lib/CodeGen/GlobalISel/GISelKnownBits.cpp +++ llvm/trunk/lib/CodeGen/GlobalISel/GISelKnownBits.cpp @@ -119,7 +119,8 @@ switch (Opcode) { default: - TL.computeKnownBitsForTargetInstr(R, Known, DemandedElts, MRI, Depth); + TL.computeKnownBitsForTargetInstr(*this, R, Known, DemandedElts, MRI, + Depth); break; case TargetOpcode::COPY: { MachineOperand Dst = MI.getOperand(0); Index: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp =================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -2589,8 +2589,9 @@ } void TargetLowering::computeKnownBitsForTargetInstr( - Register R, KnownBits &Known, const APInt &DemandedElts, - const MachineRegisterInfo &MRI, unsigned Depth) const { + GISelKnownBits &Analysis, Register R, KnownBits &Known, + const APInt &DemandedElts, const MachineRegisterInfo &MRI, + unsigned Depth) const { Known.resetAll(); }