[PATCH] D29687: [TargetLowering] check for sign-bit comparisons in SimplifyDemandedBits

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 7 14:30:34 PST 2017


spatel created this revision.
Herald added a subscriber: mcrosier.

I don't know if anything other than x86 vectors is affected by this change, but this may allow us to remove target-specific intrinsics for blendv* (vector selects). The simplification arises from the fact that blendv* instructions only use the sign-bit when deciding which vector element to choose for the destination vector. The mechanism to fold VSELECT into SHRUNKBLEND nodes already exists in x86 lowering; this demanded bits change just enables the transform to fire more often.

The original motivation starts with a bug for DSE of masked stores that seems completely unrelated, but I've explained the likely steps in this series here:
https://llvm.org/bugs/show_bug.cgi?id=11210


https://reviews.llvm.org/D29687

Files:
  lib/CodeGen/SelectionDAG/TargetLowering.cpp
  test/CodeGen/X86/vselect-pcmp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29687.87520.patch
Type: text/x-patch
Size: 8881 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170207/f6be1831/attachment.bin>


More information about the llvm-commits mailing list