<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm/lib/CodeGen/SelectionDAG/LegalizeTypesPromote.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>Various tweaks related to apint codegen.  No functionality</title>
<updated>2008-06-09T15:48:25+00:00</updated>
<author>
<name>Duncan Sands</name>
<email>baldrick@free.fr</email>
</author>
<published>2008-06-09T15:48:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=893076354a9fdb915cda27678570914dfd5732fa'/>
<id>893076354a9fdb915cda27678570914dfd5732fa</id>
<content type='text'>
change for non-funky-sized integers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52151 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
change for non-funky-sized integers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52151 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>Drop ISD::MEMSET, ISD::MEMMOVE, and ISD::MEMCPY, which are not Legal</title>
<updated>2008-04-12T04:36:06+00:00</updated>
<author>
<name>Dan Gohman</name>
<email>gohman@apple.com</email>
</author>
<published>2008-04-12T04:36:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=707e0184233f27e0e9f9aee0309f2daab8cfe7f8'/>
<id>707e0184233f27e0e9f9aee0309f2daab8cfe7f8</id>
<content type='text'>
on any current target and aren't optimized in DAGCombiner. Instead
of using intermediate nodes, expand the operations, choosing between
simple loads/stores, target-specific code, and library calls,
immediately.

Previously, the code to emit optimized code for these operations
was only used at initial SelectionDAG construction time; now it is
used at all times. This fixes some cases where rep;movs was being
used for small copies where simple loads/stores would be better.

This also cleans up code that checks for alignments less than 4;
let the targets make that decision instead of doing it in
target-independent code. This allows x86 to use rep;movs in
low-alignment cases.

Also, this fixes a bug that resulted in the use of rep;stos for
memsets of 0 with non-constant memory size when the alignment was
at least 4. It's better to use the library in this case, which
can be significantly faster when the size is large.

This also preserves more SourceValue information when memory
intrinsics are lowered into simple loads/stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49572 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
on any current target and aren't optimized in DAGCombiner. Instead
of using intermediate nodes, expand the operations, choosing between
simple loads/stores, target-specific code, and library calls,
immediately.

Previously, the code to emit optimized code for these operations
was only used at initial SelectionDAG construction time; now it is
used at all times. This fixes some cases where rep;movs was being
used for small copies where simple loads/stores would be better.

This also cleans up code that checks for alignments less than 4;
let the targets make that decision instead of doing it in
target-independent code. This allows x86 to use rep;movs in
low-alignment cases.

Also, this fixes a bug that resulted in the use of rep;stos for
memsets of 0 with non-constant memory size when the alignment was
at least 4. It's better to use the library in this case, which
can be significantly faster when the size is large.

This also preserves more SourceValue information when memory
intrinsics are lowered into simple loads/stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49572 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>detabify llvm, patch by Mike Stump!</title>
<updated>2008-03-20T01:22:40+00:00</updated>
<author>
<name>Chris Lattner</name>
<email>sabre@nondot.org</email>
</author>
<published>2008-03-20T01:22:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=71a2cb25ebc818383dd0f80475bc166f834e8d99'/>
<id>71a2cb25ebc818383dd0f80475bc166f834e8d99</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48577 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@48577 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>Give TargetLowering::getSetCCResultType() a parameter so that ISD::SETCC's</title>
<updated>2008-03-10T15:42:14+00:00</updated>
<author>
<name>Scott Michel</name>
<email>scottm@aero.org</email>
</author>
<published>2008-03-10T15:42:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=5b8f82e35b51bf007de07a7ca9347d804084ddf8'/>
<id>5b8f82e35b51bf007de07a7ca9347d804084ddf8</id>
<content type='text'>
return ValueType can depend its operands' ValueType.

This is a cosmetic change, no functionality impacted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48145 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
return ValueType can depend its operands' ValueType.

This is a cosmetic change, no functionality impacted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48145 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>
