diff options
author | Daniel Sanders <daniel_l_sanders@apple.com> | 2019-09-30 20:55:53 +0000 |
---|---|---|
committer | Daniel Sanders <daniel_l_sanders@apple.com> | 2019-09-30 20:55:53 +0000 |
commit | cbe13a1461efba73d5ab7987cf4182e4ab6960a6 (patch) | |
tree | 6c4468e5582af7e394c07b58a7c8390e27cfc023 /llvm/lib | |
parent | c8ad8686ac072fb35862f4d5e09cb1ab91a15a8e (diff) | |
download | bcm5719-llvm-cbe13a1461efba73d5ab7987cf4182e4ab6960a6.tar.gz bcm5719-llvm-cbe13a1461efba73d5ab7987cf4182e4ab6960a6.zip |
[globalisel][knownbits] Allow targets to call GISelKnownBits::computeKnownBitsImpl()
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
llvm-svn: 373264
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp b/llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp index c0391f7771f..8f9b7ddeabf 100644 --- a/llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp +++ b/llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp @@ -119,7 +119,8 @@ void GISelKnownBits::computeKnownBitsImpl(Register R, KnownBits &Known, 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); diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index d7286a2789b..09c45f644e1 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -2589,8 +2589,9 @@ void TargetLowering::computeKnownBitsForTargetNode(const SDValue Op, } 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(); } |