[PATCH] D47574: [EarlyCSE] Propagate conditions of AND and OR instructions

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 31 01:18:43 PDT 2018


mkazantsev created this revision.
mkazantsev added reviewers: craig.topper, reames, spatel, gberry.

This patches teaches EarlyCSE to figure out that if `and %x, %y` is true then both
`%x` and `%y` are true in the taken branch, and if `or %x, %y` is false then both
`%x` and `%y` are false in non-taken branch. Fix for PR37635.


https://reviews.llvm.org/D47574

Files:
  lib/Transforms/Scalar/EarlyCSE.cpp
  test/Transforms/EarlyCSE/and_or.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47574.149244.patch
Type: text/x-patch
Size: 7383 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180531/c61a0f6c/attachment.bin>


More information about the llvm-commits mailing list