[PATCH] D48557: [X86] Use XOR for SUB (C, X) during isel if will help fold an immediate

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 25 12:25:20 PDT 2018


craig.topper created this revision.
craig.topper added reviewers: spatel, RKSimon.

Same idea as https://reviews.llvm.org/D48529, but restricted to X86 and done very late to avoid any surprises where subtract might be better for DAG combining.

This seems like the safest way to do this trick. And we consider doing it as a DAG combine later.


https://reviews.llvm.org/D48557

Files:
  lib/Target/X86/X86InstrCompiler.td
  test/CodeGen/X86/bool-math.ll
  test/CodeGen/X86/dagcombine-select.ll
  test/CodeGen/X86/extract-lowbits.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48557.152746.patch
Type: text/x-patch
Size: 6898 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180625/2254e52b/attachment.bin>


More information about the llvm-commits mailing list