search for: ispow2vectortyp

Displaying 6 results from an estimated 6 matches for "ispow2vectortyp".

Did you mean: ispow2vectortype
2012 Jul 27
2
[LLVMdev] TLI.getSetCCResultType() and/or MVT broken by design?
if (N0.getOpcode() == ISD::SETCC && (LegalOperations || (!LegalOperations && VT.isPow2VectorType()))) But the comment right after it is: // sext(setcc) -> sext_in_reg(vsetcc) for vectors. // Only do this before legalize for now. if (VT.isVector() && !LegalOperations) { So, these optimizations are never safe in the general case if we can't guarantee that TLI.getSet...
2012 Jul 27
2
[LLVMdev] TLI.getSetCCResultType() and/or MVT broken by design?
...>get()); SVT.getSizeInBits() crashes, because TLI.getSetCCResultType returns an invalid MVT type and LLVMTy is NULL. Since there is no way to specify the LLVMTy manually, there is no way to fix this without finding all of the locations that use this and disabling them. I'm disabling via VT.isPow2VectorType() because an extra check, but it seems like this isn't preferable. So should I conditionalize the pre-liegalized check, or allow a backend to set the LLVMTy of newly created MVT types. So, is the design to disallow backends to set this broken, or what is expected? Let me know what you think...
2012 Jul 27
0
[LLVMdev] TLI.getSetCCResultType() and/or MVT broken by design?
Hi Micah, I think that getSetCCResultType should only be called for legal types. Disabling it on isPow2VectorType is not the way to go because there are other illegal vector types which are pow-of-two. I suggest that you call it only after type-legalization. BTW, you can't set the LLVMTy yourself because you don't have access to the LLVMContext at that point. Nadav From: llvmdev-bounces at cs.uiuc....
2012 Jul 27
0
[LLVMdev] TLI.getSetCCResultType() and/or MVT broken by design?
...lmow, Micah [mailto:Micah.Villmow at amd.com] Sent: Friday, July 27, 2012 22:33 To: Rotem, Nadav; Developers Mailing List Subject: RE: TLI.getSetCCResultType() and/or MVT broken by design? if (N0.getOpcode() == ISD::SETCC && (LegalOperations || (!LegalOperations && VT.isPow2VectorType()))) But the comment right after it is: // sext(setcc) -> sext_in_reg(vsetcc) for vectors. // Only do this before legalize for now. if (VT.isVector() && !LegalOperations) { So, these optimizations are never safe in the general case if we can't guarantee that TLI.getSet...
2013 Aug 13
1
[LLVMdev] vector type legalization
...s until a legal type is found. if (EltVT.isInteger()) { // Vectors with a number of elements that is not a power of two are always - // widened, for example <3 x float> -> <4 x float>. + // widened, for example <3 x i8> -> <4 x i8>. if (!VT.isPow2VectorType()) { NumElts = (unsigned)NextPowerOf2(NumElts); EVT NVT = EVT::getVectorVT(Context, EltVT, NumElts); + while (!isTypeLegal(NVT)) { + NumElts = (unsigned)NextPowerOf2(NumElts); + NVT = EVT::getVectorVT(Context, EltVT, NumElts); + } return L...
2013 Aug 13
0
[LLVMdev] vector type legalization
...ound. > if (EltVT.isInteger()) { > // Vectors with a number of elements that is not a power of two are always > - // widened, for example <3 x float> -> <4 x float>. > + // widened, for example <3 x i8> -> <4 x i8>. > if (!VT.isPow2VectorType()) { > NumElts = (unsigned)NextPowerOf2(NumElts); > EVT NVT = EVT::getVectorVT(Context, EltVT, NumElts); > + while (!isTypeLegal(NVT)) { > + NumElts = (unsigned)NextPowerOf2(NumElts); > + NVT = EVT::getVectorVT(Context, EltVT, NumElts); &gt...