I’m considering an optimization that would depend on llvm.assume
information be present in SelectionDAG, preferrably in the form of KnownBits
.
For instance:
__builtin_assume(k < 1u << 29);
would mark unsigned k
as a 29-bit number.
Unfortunately CodeGenPrepare::eliminateAssumptions
removes llvm.assume
and the information seems to be lost. Am I missing something?
Are there any alternatives?