[llvm-commits] [llvm] r114843 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
Dale Johannesen
dalej at apple.com
Tue Sep 28 10:33:55 PDT 2010
On Sep 28, 2010, at 2:09 AMPDT, Duncan Sands wrote:
> Hi Dale,
>
>> Don't try to make a vector of x86mmx; this won't work,
>> and asserts.
>
> what is x86mmx?
An abstraction of an MMX register; the point of using it instead of v2i32 etc. is to inhibit optimizations that create MMX operations where there weren't any. We can't do this because of the EMMS problem.
> If it isn't a scalar or vector type, should bitcast
> be allowed for it?
Chris says yes.
> If bitcast is to be allowed, it would be better
> to create a new predicate for testing whether a type can be used as
> the element type of a vector, and use that rather than hard-coding
> x86mmx here.
I'm not generally big on extra levels of abstraction, but it could be done this way.
> Also, what's the testcase?
Lots of testcases are coming later in the week.
> Ciao,
>
> Duncan.
>
>>
>>
>> Modified:
>> llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
>>
>> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp?rev=114843&r1=114842&r2=114843&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Mon Sep 27 12:29:14 2010
>> @@ -1572,7 +1572,8 @@
>>
>> unsigned WidenSize = WidenVT.getSizeInBits();
>> unsigned InSize = InVT.getSizeInBits();
>> - if (WidenSize % InSize == 0) {
>> + // x86mmx is not an acceptable vector element type, so don't try.
>> + if (WidenSize % InSize == 0&& InVT != MVT::x86mmx) {
>> // Determine new input vector type. The new input vector type will use
>> // the same element type (if its a vector) or use the input type as a
>> // vector. It is the same size as the type to widen to.
>> @@ -2049,7 +2050,8 @@
>> // Check if we can convert between two legal vector types and extract.
>> unsigned InWidenSize = InWidenVT.getSizeInBits();
>> unsigned Size = VT.getSizeInBits();
>> - if (InWidenSize % Size == 0&& !VT.isVector()) {
>> + // x86mmx is not an acceptable vector element type, so don't try.
>> + if (InWidenSize % Size == 0&& !VT.isVector()&& VT != MVT::x86mmx) {
>> unsigned NewNumElts = InWidenSize / Size;
>> EVT NewVT = EVT::getVectorVT(*DAG.getContext(), VT, NewNumElts);
>> if (TLI.isTypeSynthesizable(NewVT)) {
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list