summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
diff options
context:
space:
mode:
authorWei Mi <wmi@google.com>2017-05-25 21:49:02 +0000
committerWei Mi <wmi@google.com>2017-05-25 21:49:02 +0000
commitfd257fa7bff1dd413f8853f966bdc3e23ab339bc (patch)
tree384c07d569fbf8dc628ea815e38ed62e8c61d6d9 /llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
parentf466001eefc9de4c704f03f0748220df6a26a6a7 (diff)
downloadbcm5719-llvm-fd257fa7bff1dd413f8853f966bdc3e23ab339bc.tar.gz
bcm5719-llvm-fd257fa7bff1dd413f8853f966bdc3e23ab339bc.zip
[GVN] Add phi-translate support in scalarpre.
Right now scalarpre doesn't have phi-translate support, so it will miss some simple pre opportunities. Like the following testcase, current scalarpre cannot recognize the last "a * b" is fully redundent because a and b used by the last "a * b" expr are both defined by phis. long a[100], b[100], g1, g2, g3; __attribute__((pure)) long goo(); void foo(long a, long b, long c, long d) { g1 = a * b; if (__builtin_expect(g2 > 3, 0)) { a = c; b = d; g2 = a * b; } g3 = a * b; // fully redundant. } The patch adds phi-translate support in scalarpre. This is only a temporary solution before the newpre based on newgvn is available. Differential Revision: https://reviews.llvm.org/D32252 llvm-svn: 303923
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud