mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-24 22:32:47 +00:00
Don't apply this transform to vectors. Fixes PR2756.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55690 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
83c05e5d30
commit
23c04309fb
@ -2948,8 +2948,9 @@ Instruction *InstCombiner::visitSRem(BinaryOperator &I) {
|
|||||||
return common;
|
return common;
|
||||||
|
|
||||||
if (Value *RHSNeg = dyn_castNegVal(Op1))
|
if (Value *RHSNeg = dyn_castNegVal(Op1))
|
||||||
if (!isa<ConstantInt>(RHSNeg) ||
|
if (!isa<Constant>(RHSNeg) ||
|
||||||
cast<ConstantInt>(RHSNeg)->getValue().isStrictlyPositive()) {
|
(isa<ConstantInt>(RHSNeg) &&
|
||||||
|
cast<ConstantInt>(RHSNeg)->getValue().isStrictlyPositive())) {
|
||||||
// X % -Y -> X % Y
|
// X % -Y -> X % Y
|
||||||
AddUsesToWorkList(I);
|
AddUsesToWorkList(I);
|
||||||
I.setOperand(1, RHSNeg);
|
I.setOperand(1, RHSNeg);
|
||||||
|
Loading…
Reference in New Issue
Block a user