summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
diff options
context:
space:
mode:
authorMichael Liao <michael.hliao@gmail.com>2019-11-01 15:49:41 -0400
committerMichael Liao <michael.hliao@gmail.com>2019-11-01 17:06:17 -0400
commit4531aee2ac1609e8ddf4f3deec200c5f793faa7b (patch)
tree20b6e2ef9aec2437c6f1c6d65079279e970e5b52 /llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
parent16ec00eee7e348767f4393f189044f87f6374031 (diff)
downloadbcm5719-llvm-4531aee2ac1609e8ddf4f3deec200c5f793faa7b.tar.gz
bcm5719-llvm-4531aee2ac1609e8ddf4f3deec200c5f793faa7b.zip
[amdgpu] Fix known bits compuation on `MUL_I24`/`MUL_U24`.
Reviewers: arsenm, rampitec Subscribers: kzhuravl, jvesely, wdng, nhaehnle, dstuttard, tpr, t-tye, hiraditya, llvm-commits, yaxunl Tags: #llvm Differential Revision: https://reviews.llvm.org/D69735
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp b/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
index 1115d8c2362..8912ef44603 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
@@ -4435,6 +4435,9 @@ void AMDGPUTargetLowering::computeKnownBitsForTargetNode(
unsigned TrailZ = LHSKnown.countMinTrailingZeros() +
RHSKnown.countMinTrailingZeros();
Known.Zero.setLowBits(std::min(TrailZ, 32u));
+ // Skip extra check if all bits are known zeros.
+ if (TrailZ >= 32)
+ break;
// Truncate to 24 bits.
LHSKnown = LHSKnown.trunc(24);
OpenPOWER on IntegriCloud