[PATCH] D149383: [SelectionDAG][WIP] Add support for evaluating SetCC based on knownbits
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 18 01:50:42 PDT 2023
foad added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:4288-4289
+
+ // We aren't able to constant fold with known bits but can either 1) make
+ // conditions stronger (i.e ule -> ult) or 2) simplify with
+ // isKnownNeverZero if RHS is zero.
----------------
Just curious: does "strengthening" conditions like this actually generate better code? Is it something we do elsewhere in the compiler?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149383/new/
https://reviews.llvm.org/D149383
More information about the llvm-commits
mailing list