[PATCH] D159533: [DAG] getNode() - fold (zext (trunc x)) -> x iff the upper bits are known zero - add SRL support
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 20 09:59:01 PDT 2023
RKSimon created this revision.
RKSimon added reviewers: jrbyrnes, foad, arsenm.
Herald added subscribers: StephenFan, kerbowa, hiraditya, tpr, jvesely.
Herald added a project: All.
RKSimon requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.
This is part of the work to address the D155472 <https://reviews.llvm.org/D155472> regressions, there's a number of issues with generalizing this fold which is why I'm just adding SRL support atm.
The fold encourages the creation of ISD::FSHR nodes which is breaking a lot of the AMDGPUISD::PERM tests
@jrbyrnes it looks like AMDGPUISD::PERM matching always starts from a ISD::OR node, which have now been folded to ISD::FSHR - what is the best way to generalize the performOrCombine handling to support ISD::FSHR as well?
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D159533
Files:
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/test/CodeGen/AMDGPU/ctpop16.ll
llvm/test/CodeGen/AMDGPU/permute_i8.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159533.557123.patch
Type: text/x-patch
Size: 19600 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230920/08c2f828/attachment.bin>
More information about the llvm-commits
mailing list