HomePhabricator

Fix icmp lowering

Authored by chfast on May 20 2015, 10:21 AM.

Description

Fix icmp lowering

Summary:
During icmp lowering it can happen that a constant value can be larger than expected (see the code around the change).
APInt::getMinSignedBits() must be checked again as the shift before can change the constant sign to positive.
I'm not sure it is the best fix possible though.

Test Plan: Regression test included.

Reviewers: resistor, chandlerc, spatel, hfinkel

Reviewed By: hfinkel

Subscribers: hfinkel, llvm-commits

Differential Revision: http://reviews.llvm.org/D9147

llvm-svn: 237812

Details

Committed
chfastMay 20 2015, 10:21 AM
Reviewer
hfinkel
Differential Revision
D9147: Fix icmp lowering
Parents
rG2f1637ad8596: Use Intrinsic::ID instead of unsigned. NFC.
Branches
Unknown
Tags
Unknown