[PATCH] Revert 221429 and fix bug in TargetLowering::SimplifyDemandedBits

Gil Rapaport gil.rapaport at intel.com
Tue Jan 13 06:33:46 PST 2015


Hi qcolombet,

Suggest to replace [[ http://reviews.llvm.org/rL221429 | rL221429 ]] with the fix described in [[ http://reviews.llvm.org/D6321 | D6321 ]].

The bug in SimplifyDemandedBits (using DemandedMask instead of the single-use guarded NewMask) should be fixed regardless of the specific X86 blend optimization. Once it's applied, handling multi-uses in the X86 specific code is not needed for correctness.

While 221429 offers a way to perform the optimization even under multiple uses the current implementation would not get a chance to do so due to the multi-use guard (also note that test3 on vselect-avx.ll actually benefits from not performing the optimization as the sext-in-reg is removed altogether if left untouched). Perhaps this approach is worth generalizing to other multi-use cases?

http://reviews.llvm.org/D6949

Files:
  lib/CodeGen/SelectionDAG/TargetLowering.cpp
  lib/Target/X86/X86ISelDAGToDAG.cpp
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86ISelLowering.h
  test/CodeGen/X86/vector-blend.ll
  test/CodeGen/X86/vselect-avx.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6949.18081.patch
Type: text/x-patch
Size: 9635 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150113/ef7e391c/attachment.bin>


More information about the llvm-commits mailing list