search for: foldcastedbitwiselog

Displaying 3 results from an estimated 3 matches for "foldcastedbitwiselog".

Did you mean: foldcastedbitwiselogic
2016 Jul 21
2
Remove zext-unfolding from InstCombine
...*RCast = Builder->CreateZExt(RHS, CI.getType(), RHS->getName()); return BinaryOperator::Create(Instruction::Or, LCast, RCast); } } ``` The first two lines do the actual `zext(icmp)` optimization. The remaining lines have been added by r48715 and do the mentioned unfolding. However, in `foldCastedBitwiseLogic()` there happens a reverse of the above unfolding, which transforms `logic(cast(A), cast(B))` to `cast(logic(A, B))`: ``` if ((!isa<ICmpInst>(Cast0Src) || !isa<ICmpInst>(Cast1Src)) && shouldOptimizeCast(Cast0) && shouldOptimizeCast(Cast1)) { Value *NewOp = Build...
2016 Jul 27
2
Remove zext-unfolding from InstCombine
...t(RHS, CI.getType(), RHS->getName()); > return BinaryOperator::Create(Instruction::Or, LCast, RCast); > } > } > ``` > > The first two lines do the actual `zext(icmp)` optimization. The remaining lines have been added by r48715 and do the mentioned unfolding. However, in `foldCastedBitwiseLogic()` there happens a reverse of the above unfolding, which transforms `logic(cast(A), cast(B))` to `cast(logic(A, B))`: > > ``` > if ((!isa<ICmpInst>(Cast0Src) || !isa<ICmpInst>(Cast1Src)) && > shouldOptimizeCast(Cast0) && shouldOptimizeCast(Cast1)) { &g...
2016 Aug 04
2
Remove zext-unfolding from InstCombine
...getName()); > > return BinaryOperator::Create(Instruction::Or, LCast, RCast); > > } > > } > > ``` > > > > The first two lines do the actual `zext(icmp)` optimization. The remaining lines have been added by r48715 and do the mentioned unfolding. However, in `foldCastedBitwiseLogic()` there happens a reverse of the above unfolding, which transforms `logic(cast(A), cast(B))` to `cast(logic(A, B))`: > > > > ``` > > if ((!isa<ICmpInst>(Cast0Src) || !isa<ICmpInst>(Cast1Src)) && > > shouldOptimizeCast(Cast0) && shouldOptimi...