Files
clang-p2996/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
Craig Topper 01ceb9840a [InstCombine] Fold (zext (X +nuw C)) + -C --> zext(X) when zext has additional use. (#98533)
We have a general fold for (zext (X +nuw C2)) + C1 --> zext (X + (C2 +
trunc(C1)))
but this fold is disabled if the zext has an additional use.
    
If the two constants cancel, we can fold the whole expression to
zext(X) without increasing the number of instructions.
2024-07-12 07:40:29 -07:00

107 KiB