]> granicus.if.org Git - llvm/commit
[InstCombine] remove unneeded one-use checks for icmp fold
authorSanjay Patel <spatel@rotateright.com>
Mon, 16 Sep 2019 12:54:34 +0000 (12:54 +0000)
committerSanjay Patel <spatel@rotateright.com>
Mon, 16 Sep 2019 12:54:34 +0000 (12:54 +0000)
commitcba3b2c1c37a84400b7d96b00fd5dcaad611acd4
tree552bcc03227d001abee6924b82f6b96dc250b296
parent8624cc4ae452179b333fd0ecca5b2784edb47ec2
[InstCombine] remove unneeded one-use checks for icmp fold

This fold and several others were added in:
rL125734 <https://reviews.llvm.org/rL125734>
...with no explanation for the one-use checks other than the code
comments about register pressure.

Given that this is IR canonicalization, we shouldn't be worried
about register pressure though; the backend should be able to
adjust for that as needed.

This is part of solving PR43310 the theoretically right way:
https://bugs.llvm.org/show_bug.cgi?id=43310
...ie, if we don't cripple basic transforms, then we won't
need to add special-case code to detect larger patterns.

rL371940 is a related patch in this series.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371981 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCompares.cpp
test/Transforms/InstCombine/icmp.ll