[PATCH] D46031: [DAGCombiner] Masked merge: if 'B' is constant, de-canonicalize the pattern (invert the mask).

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 3 07:46:40 PDT 2018


lebedev.ri updated this revision to Diff 145020.
lebedev.ri marked 9 inline comments as done.
lebedev.ri added a comment.

- Don't touch `not`.
- Update `X86TargetLowering::hasAndNot()` with the check for immediates.

The last change affects the transform @spatel have added in https://reviews.llvm.org/D27489 / https://reviews.llvm.org/rL289738,
and the test coverage for X86 was missing.
But after i have added it, and looked at the changes in MCA, i'm again confused.
F6093591: icmp-opt.txt <https://reviews.llvm.org/F6093591> F6093592: pos_sel_constants.txt <https://reviews.llvm.org/F6093592> F6093593: pos_sel_special_constant.txt <https://reviews.llvm.org/F6093593>
I'd say this regression is an improvement, since `IPC` increased?


Repository:
  rL LLVM

https://reviews.llvm.org/D46031

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86ISelLowering.h
  test/CodeGen/AArch64/unfold-masked-merge-scalar-variablemask.ll
  test/CodeGen/X86/icmp-opt.ll
  test/CodeGen/X86/selectcc-to-shiftand.ll
  test/CodeGen/X86/unfold-masked-merge-scalar-variablemask.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46031.145020.patch
Type: text/x-patch
Size: 10540 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180503/37663513/attachment.bin>


More information about the llvm-commits mailing list