search for: getconstantexprinttoptr

Displaying 4 results from an estimated 4 matches for "getconstantexprinttoptr".

2009 Jul 30
2
[LLVMdev] Vector logic regression in r73431
...f code: // If the client is only demanding bits that we know, return the known // constant. if ((DemandedMask & (RHSKnownZero|RHSKnownOne)) == DemandedMask) { Constant *C = Context->getConstantInt(RHSKnownOne); if (isa<PointerType>(V->getType())) C = Context->getConstantExprIntToPtr(C, V->getType()); return C; } return false; } Note that C is a scalar integer, and so when V is actually a vector the type isn't preserved. I'm not entirely sure how this function is supposed to work with vectors though. DemandedMask, KnownOne and KnownZero are APInt's (sca...
2009 Jul 30
0
[LLVMdev] Vector logic regression in r73431
...client is only demanding bits that we know, return the known >  // constant. >  if ((DemandedMask & (RHSKnownZero|RHSKnownOne)) == DemandedMask) { >    Constant *C = Context->getConstantInt(RHSKnownOne); >    if (isa<PointerType>(V->getType())) >      C = Context->getConstantExprIntToPtr(C, V->getType()); >    return C; >  } >  return false; > } > > Note that C is a scalar integer, and so when V is actually a vector the type > isn't preserved. Right... my patch fixes that, I think. > I'm not entirely sure how this function is supposed to work wi...
2009 Jul 29
0
[LLVMdev] Vector logic regression in r73431
...now, return the known // constant. if ((DemandedMask & (RHSKnownZero|RHSKnownOne)) == DemandedMask) { - Constant *C = ConstantInt::get(*Context, RHSKnownOne); + Constant *C = ConstantInt::get(VTy, RHSKnownOne); if (isa<PointerType>(V->getType())) C = Context->getConstantExprIntToPtr(C, V->getType()); return C;
2009 Jul 29
3
[LLVMdev] Vector logic regression in r73431
Hi All, I found a regression which triggers the asserts: "Binary operator types must match!" and "Op types should be identical!". It's happening with a piece of vector code, and the asserts happen because a logic operation is attempted between a vector and a scalar (which is not present in the original code, but created by InstCombine). It's caused by revision