[PATCH] D156499: [InstCombine] Fold abs of known sign operand when source is sub

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 5 20:42:02 PDT 2023


goldstein.w.n accepted this revision.
goldstein.w.n added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: llvm/test/Transforms/InstCombine/abs-intrinsic.ll:578
 
 cond.true:
   %sub = sub nsw i8 %x, %y
----------------
Imo missing a test with `sge i8 %y, %x`. Also missing a test where the sub is in the false case (i.e `sgt %x, %y` but abs in false case).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156499/new/

https://reviews.llvm.org/D156499



More information about the llvm-commits mailing list