[PATCH] D46031: [DAGCombiner] DON'T unfold scalar masked merge if 'B' is constant

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 24 15:48:44 PDT 2018


lebedev.ri created this revision.
lebedev.ri added reviewers: spatel, craig.topper, RKSimon.
Herald added a reviewer: javed.absar.

Discovered accidentally when working on the vector part, because the `@test_andnotps`/`@test_andnotpd`
in `test/CodeGen/X86/*-schedule.ll` broke - they were no longer lowered to `andnps`/`andnpd`.

Given canonical pattern of:

  |        A  |  |B|
  ((x ^ y) & m) ^ y
   |  D  |

We don't want to handle `xor`'s with second operand being constant (especially `-1`).

I *think* this is how we want to handle it?


Repository:
  rL LLVM

https://reviews.llvm.org/D46031

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/AArch64/unfold-masked-merge-scalar-variablemask.ll
  test/CodeGen/X86/unfold-masked-merge-scalar-variablemask.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46031.143824.patch
Type: text/x-patch
Size: 9950 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180424/0cb491c3/attachment.bin>


More information about the llvm-commits mailing list