[PATCH] Fixing inst-combine not to drops nsw when combining adds into mul (PR19263)
Rafael EspĂndola
rafael.espindola at gmail.com
Wed Jun 4 12:37:03 PDT 2014
+ if (ConstantInt *CI1 = dyn_cast<ConstantInt>(LHS))
+ if (ConstantInt *CI2 = dyn_cast<ConstantInt>(RHS)) {
+ APInt ACI1 = CI1->getValue();
+ APInt ACI2 = CI2->getValue();
+ bool IsLHSNegative = ACI1.isNegative();
+ bool IsRHSNegative = ACI2.isNegative();
If both are constants, the result should have been folded before
getting here, no?
Can you rebase on trunk? WillNotOverflowSignedAdd has learned a few
extra tricks.
On 4 June 2014 14:53, Dinesh Dwivedi <dinesh.d at samsung.com> wrote:
> gentle ping
>
> http://reviews.llvm.org/D3799
>
>
More information about the llvm-commits
mailing list