[PATCH] D159533: [DAG] getNode() - fold (zext (trunc x)) -> x iff the upper bits are known zero - add SRL support
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 20 11:19:18 PDT 2023
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:5698
+ if ((OpOp.getOpcode() == ISD::AssertZext && N1->hasOneUse()) ||
+ OpOp.getOpcode() == ISD::SRL) {
APInt HiBits = APInt::getBitsSetFrom(VT.getScalarSizeInBits(),
----------------
Why does the `ISD::AssertZext` need one use check?
But while you're at it think `ISD::AND` also work here right?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159533/new/
https://reviews.llvm.org/D159533
More information about the llvm-commits
mailing list