Summary:
It seems we missed that the target hook can't query the known-bits for the
inputs to a target instruction. Fix that oversight
Reviewers: aditya_nandakumar
Subscribers: rovka, hiraditya, volkan, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67380
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373264
91177308-0d34-0410-b5e6-
96231b3b80d8
class FastISel;
class FunctionLoweringInfo;
class GlobalValue;
+class GISelKnownBits;
class IntrinsicInst;
struct KnownBits;
class LLVMContext;
/// 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;
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);
}
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();
}