[PATCH] D25485: [x86] use 'neg' for negation of bool

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 13 08:10:10 PDT 2016


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

Patch updated:
This is still an x86-only solution, but now we correctly mask the operand before negation. As Eli noted, the mask is optimized away when we know the operand's top bits are already zero (via zeroext on the input parameter in the test cases).


https://reviews.llvm.org/D25485

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/negate-i1.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25485.74517.patch
Type: text/x-patch
Size: 7624 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161013/a16b717f/attachment.bin>


More information about the llvm-commits mailing list