Improved fix for PR17827 (instcombine of shift/and/compare).
authorKay Tiong Khoo <kkhoo@perfwizard.com>
Thu, 19 Dec 2013 18:07:17 +0000 (18:07 +0000)
committerKay Tiong Khoo <kkhoo@perfwizard.com>
Thu, 19 Dec 2013 18:07:17 +0000 (18:07 +0000)
commit79b37835f931be609e6c5530934135e7726ee40a
treecaf2f925dec30a9520a845413845b581d68ab45e
parent23b78795840aadc327fa9b74ef83c2a28dbaa0ab
Improved fix for PR17827 (instcombine of shift/and/compare).

This change fixes the case of arithmetic shift right - do not attempt to fold that case.
This change also relaxes the conditions when attempting to fold the logical shift right and shift left cases.

No additional IR-level test cases included at this time. See http://llvm.org/bugs/show_bug.cgi?id=17827 for proofs that these are correct transformations.

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