This allows computeKnownBits to see the constant being loaded.
This recovers the rv64zbp test case changes from D127520.
Paths
| Differential D127679
[RISCV] Implement RISCVTargetLowering::getTargetConstantFromLoad. ClosedPublic Authored by craig.topper on Jun 13 2022, 11:53 AM.
Details Summary This allows computeKnownBits to see the constant being loaded. This recovers the rv64zbp test case changes from D127520.
Diff Detail
Event Timeline
Comment Actions LGTM - mostly I'm deferring to you on the direction. I have no objection here, and the code looks reasonable. I just don't have sufficient context to have any confidence this is or isn't the right approach. This revision is now accepted and ready to land.Jun 15 2022, 1:36 PM This revision was landed with ongoing or failed builds.Jun 16 2022, 3:15 PM Closed by commit rG9d7b01dc9521: [RISCV] Implement RISCVTargetLowering::getTargetConstantFromLoad. (authored by craig.topper). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 437729 llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/rv64zbp-intrinsic.ll
llvm/test/CodeGen/RISCV/rv64zbp.ll
|
I may be missing the obvious here, but... if we peak back through an add to find the constant pool entry, don't we need to account for the offset when processing the constant?
(e.g. if the constant is 8 bytes, but the addi offset was 4, aren't we only loading 4 out of the bytes not the whole constant?)