[PATCH] D53310: [X86] Match (cmp (and (shr X, C), mask), 0) to BEXTR+TEST.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 15 23:06:47 PDT 2018


craig.topper created this revision.
craig.topper added reviewers: RKSimon, lebedev.ri, spatel.
Herald added a subscriber: JDevlieghere.

Without this we match the CMP+AND to a TEST and then match the SHR separately. I'm trusting analyzeCompare to remove the TEST during the peephole pass. Otherwise we need to check the flag users to see if they only use the Z flag.

This recovers a case lost by r344270.


Repository:
  rL LLVM

https://reviews.llvm.org/D53310

Files:
  lib/Target/X86/X86ISelDAGToDAG.cpp
  test/CodeGen/X86/tbm_patterns.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53310.169785.patch
Type: text/x-patch
Size: 5321 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181016/fa1d43c2/attachment.bin>


More information about the llvm-commits mailing list