<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm/lib/CodeGen/SelectionDAG/LegalizeTypesSplit.cpp, branch master</title>
<subtitle>Unofficial llvm GIT mirror used in EmbToolkit
</subtitle>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/'/>
<entry>
<title>Split type expansion into ExpandInteger and ExpandFloat</title>
<updated>2008-06-17T14:27:01+00:00</updated>
<author>
<name>Duncan Sands</name>
<email>baldrick@free.fr</email>
</author>
<published>2008-06-17T14:27:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=69b01e92a29ce6d7e435171aeea3fbc987b81586'/>
<id>69b01e92a29ce6d7e435171aeea3fbc987b81586</id>
<content type='text'>
rather than bundling them together.  Rename FloatToInt
to PromoteFloat (better, if not perfect).  Reorganize
files by types rather than by operations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52408 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
rather than bundling them together.  Rename FloatToInt
to PromoteFloat (better, if not perfect).  Reorganize
files by types rather than by operations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52408 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>LegalizeTypes support for INSERT_VECTOR_ELT with</title>
<updated>2008-06-15T20:00:14+00:00</updated>
<author>
<name>Duncan Sands</name>
<email>baldrick@free.fr</email>
</author>
<published>2008-06-15T20:00:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=7d0d8460646d1a06ff561775d40123a4cf65bf4d'/>
<id>7d0d8460646d1a06ff561775d40123a4cf65bf4d</id>
<content type='text'>
a non-constant index.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52292 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
a non-constant index.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52292 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove comparison methods for MVT.  The main cause</title>
<updated>2008-06-08T20:54:56+00:00</updated>
<author>
<name>Duncan Sands</name>
<email>baldrick@free.fr</email>
</author>
<published>2008-06-08T20:54:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=8e4eb09b1e3571965f49edcdfb56b1375b1b7551'/>
<id>8e4eb09b1e3571965f49edcdfb56b1375b1b7551</id>
<content type='text'>
of apint codegen failure is the DAG combiner doing
the wrong thing because it was comparing MVT's using
&lt; rather than comparing the number of bits.  Removing
the &lt; method makes this mistake impossible to commit.
Instead, add helper methods for comparing bits and use
them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52098 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
of apint codegen failure is the DAG combiner doing
the wrong thing because it was comparing MVT's using
&lt; rather than comparing the number of bits.  Removing
the &lt; method makes this mistake impossible to commit.
Instead, add helper methods for comparing bits and use
them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52098 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Wrap MVT::ValueType in a struct to get type safety</title>
<updated>2008-06-06T12:08:01+00:00</updated>
<author>
<name>Duncan Sands</name>
<email>baldrick@free.fr</email>
</author>
<published>2008-06-06T12:08:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=83ec4b6711980242ef3c55a4fa36b2d7a39c1bfb'/>
<id>83ec4b6711980242ef3c55a4fa36b2d7a39c1bfb</id>
<content type='text'>
and better control the abstraction.  Rename the type
to MVT.  To update out-of-tree patches, the main
thing to do is to rename MVT::ValueType to MVT, and
rewrite expressions like MVT::getSizeInBits(VT) in
the form VT.getSizeInBits().  Use VT.getSimpleVT()
to extract a MVT::SimpleValueType for use in switch
statements (you will get an assert failure if VT is
an extended value type - these shouldn't exist after
type legalization).
This results in a small speedup of codegen and no
new testsuite failures (x86-64 linux).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52044 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and better control the abstraction.  Rename the type
to MVT.  To update out-of-tree patches, the main
thing to do is to rename MVT::ValueType to MVT, and
rewrite expressions like MVT::getSizeInBits(VT) in
the form VT.getSizeInBits().  Use VT.getSimpleVT()
to extract a MVT::SimpleValueType for use in switch
statements (you will get an assert failure if VT is
an extended value type - these shouldn't exist after
type legalization).
This results in a small speedup of codegen and no
new testsuite failures (x86-64 linux).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52044 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Add some more FIXME's for indexed loads and stores.</title>
<updated>2008-04-18T20:27:12+00:00</updated>
<author>
<name>Duncan Sands</name>
<email>baldrick@free.fr</email>
</author>
<published>2008-04-18T20:27:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=4cc04564567686e62ec5aed7ef9efc7b3ef973aa'/>
<id>4cc04564567686e62ec5aed7ef9efc7b3ef973aa</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49916 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49916 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Simplify using getIntPtrConstant.</title>
<updated>2008-03-14T05:23:57+00:00</updated>
<author>
<name>Duncan Sands</name>
<email>baldrick@free.fr</email>
</author>
<published>2008-03-14T05:23:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=d1ba3338d1b0084122c32a8085e41a8dd5e91edc'/>
<id>d1ba3338d1b0084122c32a8085e41a8dd5e91edc</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48355 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48355 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Initial soft-float support for LegalizeTypes.  I rewrote</title>
<updated>2008-03-12T21:27:04+00:00</updated>
<author>
<name>Duncan Sands</name>
<email>baldrick@free.fr</email>
</author>
<published>2008-03-12T21:27:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=d8742eeb2f7cabc45a1c3736a2780bf87ba684ba'/>
<id>d8742eeb2f7cabc45a1c3736a2780bf87ba684ba</id>
<content type='text'>
the fcopysign expansion from LegalizeDAG to get rid of
what seems to be a bug: the use of sign extension means
that when copying the sign bit from an f32 to an f64,
the upper 32 bits of the f64 (now an i64) are set, not
just the top bit...  I also generalized it to work for
any sized floating point types, and removed the bogosity:
  SDOperand Mask1 = (SrcVT == MVT::f64)
    ? DAG.getConstantFP(BitsToDouble(1ULL &lt;&lt; 63), SrcVT)
    : DAG.getConstantFP(BitsToFloat(1U &lt;&lt; 31), SrcVT);
  Mask1 = DAG.getNode(ISD::BIT_CONVERT, SrcNVT, Mask1);
(here SrcNVT is an integer with the same size as SrcVT).
As far as I can see this takes a 1 &lt;&lt; 63, converts to
a double, converts that to a floating point constant
then converts that to an integer constant, ending up
with... 1 &lt;&lt; 63 as an integer constant!  So I just
generate this integer constant directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48305 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the fcopysign expansion from LegalizeDAG to get rid of
what seems to be a bug: the use of sign extension means
that when copying the sign bit from an f32 to an f64,
the upper 32 bits of the f64 (now an i64) are set, not
just the top bit...  I also generalized it to work for
any sized floating point types, and removed the bogosity:
  SDOperand Mask1 = (SrcVT == MVT::f64)
    ? DAG.getConstantFP(BitsToDouble(1ULL &lt;&lt; 63), SrcVT)
    : DAG.getConstantFP(BitsToFloat(1U &lt;&lt; 31), SrcVT);
  Mask1 = DAG.getNode(ISD::BIT_CONVERT, SrcNVT, Mask1);
(here SrcNVT is an integer with the same size as SrcVT).
As far as I can see this takes a 1 &lt;&lt; 63, converts to
a double, converts that to a floating point constant
then converts that to an integer constant, ending up
with... 1 &lt;&lt; 63 as an integer constant!  So I just
generate this integer constant directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48305 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Some LegalizeTypes code factorization and minor</title>
<updated>2008-03-11T06:41:14+00:00</updated>
<author>
<name>Duncan Sands</name>
<email>baldrick@free.fr</email>
</author>
<published>2008-03-11T06:41:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=ac7613a3263caa80d735f3fbf2b9f7b81deabc08'/>
<id>ac7613a3263caa80d735f3fbf2b9f7b81deabc08</id>
<content type='text'>
enhancements.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48215 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
enhancements.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48215 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a FIXME about the VECTOR_SHUFFLE evil hack.</title>
<updated>2008-02-27T17:39:13+00:00</updated>
<author>
<name>Duncan Sands</name>
<email>baldrick@free.fr</email>
</author>
<published>2008-02-27T17:39:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=052e976f856fc66fce47d75be893480776906539'/>
<id>052e976f856fc66fce47d75be893480776906539</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47676 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47676 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>LegalizeTypes support for EXTRACT_VECTOR_ELT.  The</title>
<updated>2008-02-27T13:34:40+00:00</updated>
<author>
<name>Duncan Sands</name>
<email>baldrick@free.fr</email>
</author>
<published>2008-02-27T13:34:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=077f9b20d0e8659d00a09046a63e28edf0665ffe'/>
<id>077f9b20d0e8659d00a09046a63e28edf0665ffe</id>
<content type='text'>
approach taken is different to that in LegalizeDAG
when it is a question of expanding or promoting the
result type: for example, if extracting an i64 from
a &lt;2 x i64&gt;, when i64 needs expanding, it bitcasts
the vector to &lt;4 x i32&gt;, extracts the appropriate
two i32's, and uses those for the Lo and Hi parts.
Likewise, when extracting an i16 from a &lt;4 x i16&gt;,
and i16 needs promoting, it bitcasts the vector to
&lt;2 x i32&gt;, extracts the appropriate i32, twiddles
the bits if necessary, and uses that as the promoted
value.  This puts more pressure on bitcast legalization,
and I've added the appropriate cases.  They needed to
be added anyway since users can generate such bitcasts
too if they want to.  Also, when considering various
cases (Legal, Promote, Expand, Scalarize, Split) it is
a pain that expand can correspond to Expand, Scalarize
or Split, so I've changed the LegalizeTypes enum so it
lists those different cases - now Expand only means
splitting a scalar in two.
The code produced is the same as by LegalizeDAG for
all relevant testcases, except for
2007-10-31-extractelement-i64.ll, where the code seems
to have improved (see below; can an expert please tell
me if it is better or not).
Before &lt; vs after &gt;.

&lt;       subl    $92, %esp
&lt;       movaps  %xmm0, 64(%esp)
&lt;       movaps  %xmm0, (%esp)
&lt;       movl    4(%esp), %eax
&lt;       movl    %eax, 28(%esp)
&lt;       movl    (%esp), %eax
&lt;       movl    %eax, 24(%esp)
&lt;       movq    24(%esp), %mm0
&lt;       movq    %mm0, 56(%esp)
---
&gt;       subl    $44, %esp
&gt;       movaps  %xmm0, 16(%esp)
&gt;       pshufd  $1, %xmm0, %xmm1
&gt;       movd    %xmm1, 4(%esp)
&gt;       movd    %xmm0, (%esp)
&gt;       movq    (%esp), %mm0
&gt;       movq    %mm0, 8(%esp)

&lt;       subl    $92, %esp
&lt;       movaps  %xmm0, 64(%esp)
&lt;       movaps  %xmm0, (%esp)
&lt;       movl    12(%esp), %eax
&lt;       movl    %eax, 28(%esp)
&lt;       movl    8(%esp), %eax
&lt;       movl    %eax, 24(%esp)
&lt;       movq    24(%esp), %mm0
&lt;       movq    %mm0, 56(%esp)
---
&gt;       subl    $44, %esp
&gt;       movaps  %xmm0, 16(%esp)
&gt;       pshufd  $3, %xmm0, %xmm1
&gt;       movd    %xmm1, 4(%esp)
&gt;       movhlps %xmm0, %xmm0
&gt;       movd    %xmm0, (%esp)
&gt;       movq    (%esp), %mm0
&gt;       movq    %mm0, 8(%esp)

&lt;       subl    $92, %esp
&lt;       movaps  %xmm0, 64(%esp)
---
&gt;       subl    $44, %esp

&lt;       movl    16(%esp), %eax
&lt;       movl    %eax, 48(%esp)
&lt;       movl    20(%esp), %eax
&lt;       movl    %eax, 52(%esp)
&lt;       movaps  %xmm0, (%esp)
&lt;       movl    4(%esp), %eax
&lt;       movl    %eax, 60(%esp)
&lt;       movl    (%esp), %eax
&lt;       movl    %eax, 56(%esp)
---
&gt;       pshufd  $1, %xmm0, %xmm1
&gt;       movd    %xmm1, 4(%esp)
&gt;       movd    %xmm0, (%esp)
&gt;       movd    %xmm1, 12(%esp)
&gt;       movd    %xmm0, 8(%esp)

&lt;       subl    $92, %esp
&lt;       movaps  %xmm0, 64(%esp)
---
&gt;       subl    $44, %esp

&lt;       movl    24(%esp), %eax
&lt;       movl    %eax, 48(%esp)
&lt;       movl    28(%esp), %eax
&lt;       movl    %eax, 52(%esp)
&lt;       movaps  %xmm0, (%esp)
&lt;       movl    12(%esp), %eax
&lt;       movl    %eax, 60(%esp)
&lt;       movl    8(%esp), %eax
&lt;       movl    %eax, 56(%esp)
---
&gt;       pshufd  $3, %xmm0, %xmm1
&gt;       movd    %xmm1, 4(%esp)
&gt;       movhlps %xmm0, %xmm0
&gt;       movd    %xmm0, (%esp)
&gt;       movd    %xmm1, 12(%esp)
&gt;       movd    %xmm0, 8(%esp)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47672 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
approach taken is different to that in LegalizeDAG
when it is a question of expanding or promoting the
result type: for example, if extracting an i64 from
a &lt;2 x i64&gt;, when i64 needs expanding, it bitcasts
the vector to &lt;4 x i32&gt;, extracts the appropriate
two i32's, and uses those for the Lo and Hi parts.
Likewise, when extracting an i16 from a &lt;4 x i16&gt;,
and i16 needs promoting, it bitcasts the vector to
&lt;2 x i32&gt;, extracts the appropriate i32, twiddles
the bits if necessary, and uses that as the promoted
value.  This puts more pressure on bitcast legalization,
and I've added the appropriate cases.  They needed to
be added anyway since users can generate such bitcasts
too if they want to.  Also, when considering various
cases (Legal, Promote, Expand, Scalarize, Split) it is
a pain that expand can correspond to Expand, Scalarize
or Split, so I've changed the LegalizeTypes enum so it
lists those different cases - now Expand only means
splitting a scalar in two.
The code produced is the same as by LegalizeDAG for
all relevant testcases, except for
2007-10-31-extractelement-i64.ll, where the code seems
to have improved (see below; can an expert please tell
me if it is better or not).
Before &lt; vs after &gt;.

&lt;       subl    $92, %esp
&lt;       movaps  %xmm0, 64(%esp)
&lt;       movaps  %xmm0, (%esp)
&lt;       movl    4(%esp), %eax
&lt;       movl    %eax, 28(%esp)
&lt;       movl    (%esp), %eax
&lt;       movl    %eax, 24(%esp)
&lt;       movq    24(%esp), %mm0
&lt;       movq    %mm0, 56(%esp)
---
&gt;       subl    $44, %esp
&gt;       movaps  %xmm0, 16(%esp)
&gt;       pshufd  $1, %xmm0, %xmm1
&gt;       movd    %xmm1, 4(%esp)
&gt;       movd    %xmm0, (%esp)
&gt;       movq    (%esp), %mm0
&gt;       movq    %mm0, 8(%esp)

&lt;       subl    $92, %esp
&lt;       movaps  %xmm0, 64(%esp)
&lt;       movaps  %xmm0, (%esp)
&lt;       movl    12(%esp), %eax
&lt;       movl    %eax, 28(%esp)
&lt;       movl    8(%esp), %eax
&lt;       movl    %eax, 24(%esp)
&lt;       movq    24(%esp), %mm0
&lt;       movq    %mm0, 56(%esp)
---
&gt;       subl    $44, %esp
&gt;       movaps  %xmm0, 16(%esp)
&gt;       pshufd  $3, %xmm0, %xmm1
&gt;       movd    %xmm1, 4(%esp)
&gt;       movhlps %xmm0, %xmm0
&gt;       movd    %xmm0, (%esp)
&gt;       movq    (%esp), %mm0
&gt;       movq    %mm0, 8(%esp)

&lt;       subl    $92, %esp
&lt;       movaps  %xmm0, 64(%esp)
---
&gt;       subl    $44, %esp

&lt;       movl    16(%esp), %eax
&lt;       movl    %eax, 48(%esp)
&lt;       movl    20(%esp), %eax
&lt;       movl    %eax, 52(%esp)
&lt;       movaps  %xmm0, (%esp)
&lt;       movl    4(%esp), %eax
&lt;       movl    %eax, 60(%esp)
&lt;       movl    (%esp), %eax
&lt;       movl    %eax, 56(%esp)
---
&gt;       pshufd  $1, %xmm0, %xmm1
&gt;       movd    %xmm1, 4(%esp)
&gt;       movd    %xmm0, (%esp)
&gt;       movd    %xmm1, 12(%esp)
&gt;       movd    %xmm0, 8(%esp)

&lt;       subl    $92, %esp
&lt;       movaps  %xmm0, 64(%esp)
---
&gt;       subl    $44, %esp

&lt;       movl    24(%esp), %eax
&lt;       movl    %eax, 48(%esp)
&lt;       movl    28(%esp), %eax
&lt;       movl    %eax, 52(%esp)
&lt;       movaps  %xmm0, (%esp)
&lt;       movl    12(%esp), %eax
&lt;       movl    %eax, 60(%esp)
&lt;       movl    8(%esp), %eax
&lt;       movl    %eax, 56(%esp)
---
&gt;       pshufd  $3, %xmm0, %xmm1
&gt;       movd    %xmm1, 4(%esp)
&gt;       movhlps %xmm0, %xmm0
&gt;       movd    %xmm0, (%esp)
&gt;       movd    %xmm1, 12(%esp)
&gt;       movd    %xmm0, 8(%esp)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47672 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
</feed>
