[PATCH] D74484: [AggressiveInstCombine] Add support for ICmp instr that feeds a select intsr's condition operand.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 13:00:08 PDT 2020


spatel added a comment.
Herald added a reviewer: ctetreau.

I still haven't had a chance to actually look at the code here.
@nikic / @lebedev.ri - are your concerns handled?



================
Comment at: llvm/test/Transforms/AggressiveInstCombine/trunc_select_cmp.ll:4-5
+
+; Today, InstCombine cannot handle the following cases since it doesn't
+; allow - in any way - an instruction with multiple uses to be shrunk.
+; Aggressive InstCombine, on the other hand, remembers all the nodes we
----------------
This isn't entirely accurate for the tests as shown. The problem in several of these tests is not that there are extra uses; it's that we don't canonicalize icmp and min/max as well as possible. That was what rGf2fbdf76d8d0 was trying to solve, but I don't think there's a quick fix to restore that.

Please add some extra uses in these first 4 tests, so we have a better representation of the motivating tests. One way to do that is to add something like:
declare void @use(i32)
and then:
call void @use(i32 %conv)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74484/new/

https://reviews.llvm.org/D74484





More information about the llvm-commits mailing list