search for: shouldoptimizecast

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

2016 Jul 21
2
Remove zext-unfolding from InstCombine
...e 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 = Builder->CreateBinOp(LogicOpc, Cast0Src, Cast1Src, I.getName()); return CastInst::Create(CastOpcode, NewOp, DestTy); } ``` The `(!isa<ICmpInst>(Cast0Src) || !isa<ICmpInst>(Cast1Sr...
2016 Jul 27
2
Remove zext-unfolding from InstCombine
...15 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 = Builder->CreateBinOp(LogicOpc, Cast0Src, Cast1Src, > I.getName()); > return CastInst::Create(CastOpcode, NewOp, DestTy); > } > ``` > > The `(!isa<ICmpInst>(Cast0S...
2016 Aug 04
2
Remove zext-unfolding from InstCombine
...oned 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 = Builder->CreateBinOp(LogicOpc, Cast0Src, Cast1Src, > > I.getName()); > > return CastInst::Create(CastOpcode, NewOp, DestTy); > > } > > ``` > > > >...