[PATCH] D122013: [InstCombine] Fold abs of known negative operand when source is sub

chenglin.bi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 18 18:43:32 PDT 2022


bcl5980 added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/abs-intrinsic.ll:430
+define i32 @sub_abs(i32 %x, i32 %y) {
+; CHECK-LABEL: @sub_abs
+entry:
----------------
craig.topper wrote:
> bcl5980 wrote:
> > RKSimon wrote:
> > > where are the actual codegen checks?
> > ; CHECK-NOT: llvm.abs.i32
> > If the code works, llvm.abs.i32 will be removed.
> Checks in InstCombine tests are usually autogenerated with utils/update_test_checks.py as the top of this file says. Please use that.
I'm sorry for the terrible test case. I'm an beginner on llvm so can someone tell me how the update_test_checks.py works and what should I do next? Or is there any document or sample to show how it works?


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

https://reviews.llvm.org/D122013



More information about the llvm-commits mailing list