[PATCH] D158364: [DAG] SimplifyDemandedBits - if we're only demanding the signbits, a SMIN/SMAX node can be simplified to a OR/AND node respectively.
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 22 09:54:32 PDT 2023
goldstein.w.n added a comment.
Also I think this also works for `umax` / `umin` (although inverted): https://alive2.llvm.org/ce/z/UX_NYn
There is a fair bit of common codes between, maybe a this should also come with a helper like
`simplifyMinMaxWithDemandedBits`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158364/new/
https://reviews.llvm.org/D158364
More information about the llvm-commits
mailing list