[PATCH] D45108: [InstCombine] Get rid of select of bittest (PR36950 / PR17564)

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 30 14:30:18 PDT 2018


lebedev.ri created this revision.
lebedev.ri added reviewers: spatel, craig.topper.
lebedev.ri added a dependency: D45107: [InstCombine] [NFC] Add tests for getting rid of select of bittest (PR36950 / PR17564).

See PR36950 <https://bugs.llvm.org/show_bug.cgi?id=36950>, PR17564 <https://bugs.llvm.org/show_bug.cgi?id=17564>, https://reviews.llvm.org/D45065, https://reviews.llvm.org/D45107

This is complementary to https://reviews.llvm.org/D45065, either one will solve PR17564 <https://bugs.llvm.org/show_bug.cgi?id=17564>,
but this one will add one more fold pattern, which may be useful.

Notes:

- I don't actually check that C is < 32, some other fold already happens by then. Should i check anyway?
- Am i missing some has-one-use checks?

Please review carefully.

Alive proof: https://rise4fun.com/Alive/uiH

Testing: `ninja check-llvm`


Repository:
  rL LLVM

https://reviews.llvm.org/D45108

Files:
  lib/Transforms/InstCombine/InstCombineSelect.cpp
  test/Transforms/InstCombine/select-of-bittest.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45108.140487.patch
Type: text/x-patch
Size: 6780 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180330/b6bb2442/attachment.bin>


More information about the llvm-commits mailing list