[PATCH] D47076: [InstCombine] choose 1 form of abs and nabs as canonical

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 18 13:45:52 PDT 2018


spatel updated this revision to Diff 147578.
spatel added a comment.

Patch updated:
Always choose "<s 0" because a sign-bit check and zero constant are most likely to match what codegen prefers.


https://reviews.llvm.org/D47076

Files:
  lib/Transforms/InstCombine/InstCombineSelect.cpp
  test/Transforms/InstCombine/abs-1.ll
  test/Transforms/InstCombine/abs_abs.ll
  test/Transforms/InstCombine/icmp.ll
  test/Transforms/InstCombine/max-of-nots.ll
  test/Transforms/InstCombine/select_meta.ll
  test/Transforms/InstSimplify/call-callconv.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47076.147578.patch
Type: text/x-patch
Size: 34489 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180518/0a8ef4ac/attachment.bin>


More information about the llvm-commits mailing list