History log of /external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cd81d94322a39503e4a3e87b6ee03d4fcb3465fb 21-Jul-2014 Stephen Hines <srhines@google.com> Update LLVM for rebase to r212749.

Includes a cherry-pick of:
r212948 - fixes a small issue with atomic calls

Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
dce4a407a24b04eebc6a376f8e62b41aaa7b071f 29-May-2014 Stephen Hines <srhines@google.com> Update LLVM for 3.5 rebase (r209712).

Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4e2d2f091e88dd83d1685173d2c0692d8ae155e6 21-Nov-2013 Daniel Sanders <daniel.sanders@imgtec.com> Merging r195355:
------------------------------------------------------------------------
r195355 | dsanders | 2013-11-21 13:24:49 +0000 (Thu, 21 Nov 2013) | 20 lines

Add support for legalizing SETNE/SETEQ by inverting the condition code and the result of the comparison.

Summary:
LegalizeSetCCCondCode can now legalize SETEQ and SETNE by returning the inverse
condition and requesting that the caller invert the result of the condition.

The caller of LegalizeSetCCCondCode must handle the inverted CC, and they do
so as follows:
SETCC, BR_CC:
Invert the result of the SETCC with SelectionDAG::getNOT()
SELECT_CC:
Swap the true/false operands.

This is necessary for MSA which lacks an integer SETNE instruction.

Reviewers: resistor

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2229
------------------------------------------------------------------------



git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@195363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ca1b7799aaeeeb0c6af80fa31fb8f74e79ab2967 17-Nov-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Use more getZExtOrTruncs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
91053d585abf6b20b770532d007a8b7648d0621f 17-Nov-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Use getZExtOrTrunc instead of repeating the same logic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4f17f88071260cecffd96c272098549ac5887523 31-Oct-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Fix CodeGen for unaligned loads with address spaces

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
66589dcc8fb5dcf0894a9a80a8dee890a4f3a379 28-Oct-2013 Richard Sandiford <rsandifo@linux.vnet.ibm.com> Keep TBAA info when rewriting SelectionDAG loads and stores

Most SelectionDAG code drops the TBAA info when creating a new form of a
load and store (e.g. during legalization, or when converting a plain
load to an extending one). This patch tries to catch all cases where
the TBAA information can legitimately be carried over.

The patch adds alternative forms of getLoad() and getExtLoad() that take
a MachineMemOperand instead of individual fields. (The corresponding
getTruncStore() already exists.) The idea is to use the MachineMemOperand
forms when all fields are carried over (size, pointer info, isVolatile,
isNonTemporal, alignment and TBAA info). If some adjustment is being
made, e.g. to narrow the load, then we still pass the individual fields
but also pass the TBAA info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5a42ae81f742aaab826b7a72cb0a9a7e5a957a07 25-Oct-2013 Tim Northover <tnorthover@apple.com> LegalizeDAG: allow libcalls for max/min atomic operations

ARM processors without ldrex/strex need to be able to make libcalls for all
atomic operations, including the newer min/max versions.

The alternative would probably be expanding these operations in terms of
cmpxchg (as x86 does always), but in the configurations where this matters
code-size tends to be paramount so the libcall is more desirable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193398 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
641bea117d2f5e68c11156b9eea1c9270825dfb9 18-Oct-2013 David Majnemer <david.majnemer@gmail.com> CodeGen: Emit a libcall if the target doesn't support 16-byte wide atomics

There are targets that support i128 sized scalars but cannot emit
instructions that modify them directly. The proper thing to do is to
emit a libcall.

This fixes PR17481.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
55240a5ddbaebc44c9acb0353c18a394b06f348f 14-Oct-2013 Elena Demikhovsky <elena.demikhovsky@intel.com> Fixed a bug in dynamic allocation memory on stack.
The alignment of allocated space was wrong, see Bugzila 17345.

Done by Zvi Rackover <zvi.rackover@intel.com>.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
20a3bc600c62b2519a1b6be7e752a8ac00deac3b 01-Oct-2013 Tom Stellard <thomas.stellard@amd.com> SelectionDAG: Clarify comments from r191600

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8034d7100652091c20101554a3b6d6afa545e696 28-Sep-2013 Tom Stellard <thomas.stellard@amd.com> SelectionDAG: Silence unused variable warning on release builds

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191604 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bbafe422d6f9036b03992ee5eacb5d09644c3267 28-Sep-2013 Tom Stellard <thomas.stellard@amd.com> SelectionDAG: Improve legalization of SELECT_CC with illegal condition codes

SelectionDAG will now attempt to inverse an illegal conditon in order to
find a legal one and if that doesn't work, it will attempt to swap the
operands using the inverted condition.

There are no new test cases for this, but a nubmer of the existing R600
tests hit this path.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
12d43f9baf83b6a2cc444c89bb688ebfe01a9fa1 28-Sep-2013 Tom Stellard <thomas.stellard@amd.com> SelectionDAG: Try to expand all condition codes using getCCSwappedOperands()

This is useful for targets like R600, which only support GT, GE, NE, and EQ
condition codes as it removes the need to handle unsupported condition
codes in target specific code.

There are no tests with this commit, but R600 has been updated to take
advantage of this new feature, so its existing selectcc tests are now
testing the swapped operands path.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8a9879a4481667b18eee4a0f8b254b3810878539 28-Sep-2013 Tom Stellard <thomas.stellard@amd.com> SelectionDAG: Clean up LegalizeSetCCCondCode() function

Interpreting the results of this function is not very intuitive, so I
cleaned it up to make it more clear whether or not a SETCC op was
legalized and how it was legalized (either by swapping LHS and RHS or
replacing with AND/OR).

This patch does change functionality in the LHS and RHS swapping case,
but unfortunately there are no in-tree tests for this. However, this
patch is a prerequisite for R600 to take advantage of the LHS and RHS
swapping, so tests will be added in subsequent commits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191600 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
edd08f74289c6ba3b3f8e730e4ab825ef9bd6492 26-Aug-2013 Tom Stellard <thomas.stellard@amd.com> SelectionDAG: Remove unnecessary uses of TargetLowering::getPointerTy()

If we have a binary operation like ISD:ADD, we can set the result type
equal to the result type of one of its operands rather than using
TargetLowering::getPointerTy().

Also, any use of DAG.getIntPtrConstant(C) as an operand for a binary
operation can be replaced with:
DAG.getConstant(C, OtherOperand.getValueType());

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189227 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0ff1190888f5b24f64a196392c452800447186d8 15-Aug-2013 Craig Topper <craig.topper@gmail.com> Replace getValueType().getSimpleVT() with getSimpleValueType().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188442 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
41418d17cced656f91038b2482bc9d173b4974b0 08-Aug-2013 Hal Finkel <hfinkel@anl.gov> Add ISD::FROUND for libm round()

All libm floating-point rounding functions, except for round(), had their own
ISD nodes. Recent PowerPC cores have an instruction for round(), and so here I'm
adding ISD::FROUND so that round() can be custom lowered as well.

For the most part, this is straightforward. I've added an intrinsic
and a matching ISD node just like those for nearbyint() and friends. The
SelectionDAG pattern I've named frnd (because ISD::FP_ROUND has already claimed
fround).

This will be used by the PowerPC backend in a follow-up commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
425b76c2314ff7ee7ad507011bdda1988ae481ef 06-Aug-2013 Tom Stellard <thomas.stellard@amd.com> TargetLowering: Add getVectorIdxTy() function v2

This virtual function can be implemented by targets to specify the type
to use for the index operand of INSERT_VECTOR_ELT, EXTRACT_VECTOR_ELT,
INSERT_SUBVECTOR, EXTRACT_SUBVECTOR. The default implementation returns
the result from TargetLowering::getPointerTy()

The previous code was using TargetLowering::getPointerTy() for vector
indices, because this is guaranteed to be legal on all targets. However,
using TargetLowering::getPointerTy() can be a problem for targets with
pointer sizes that differ across address spaces. On such targets,
when vectors need to be loaded or stored to an address space other than the
default 'zero' address space (which is the address space assumed by
TargetLowering::getPointerTy()), having an index that
is a different size than the pointer can lead to inefficient
pointer calculations, (e.g. 64-bit adds for a 32-bit address space).

There is no intended functionality change with this patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
155615d7dc4e4fbfd3b7273720a76356468edf46 08-Jul-2013 Stephen Lin <stephenwlin@gmail.com> Remove trailing whitespace from SelectionDAG/*.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f349a6e9e6ee0b589c403e0c5785266da121d05c 04-Jul-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove the EXCEPTIONADDR, EHSELECTION, and LSDAADDR ISD opcodes.

These exception-related opcodes are not used any longer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185625 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c93822901aef17aaf8bb1303f27b47025fd1d582 04-Jul-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Revert r185595-185596 which broke buildbots.

Revert "Simplify landing pad lowering."
Revert "Remove the EXCEPTIONADDR, EHSELECTION, and LSDAADDR ISD opcodes."

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185600 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
62204220e1dc2dc21256adf765728ae257b33eac 04-Jul-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove the EXCEPTIONADDR, EHSELECTION, and LSDAADDR ISD opcodes.

These exception-related opcodes are not used any longer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b05e4778f0871cbb02f61e4d55ad7375738a1d01 15-Jun-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Introduce getSelect usage and use more getSelectCC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6e0b2a0cb0d398f175a5294bf0ad5488c714e8c2 30-May-2013 Andrew Trick <atrick@apple.com> Order CALLSEQ_START and CALLSEQ_END nodes.

Fixes PR16146: gdb.base__call-ar-st.exp fails after
pre-RA-sched=source fixes.

Patch by Xiaoyi Guo!

This also fixes an unsupported dbg.value test case. Codegen was
previously incorrect but the test was passing by luck.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ac6d9bec671252dd1e596fa71180ff6b39d06b5d 25-May-2013 Andrew Trick <atrick@apple.com> Track IR ordering of SelectionDAG nodes 2/4.

Change SelectionDAG::getXXXNode() interfaces as well as call sites of
these functions to pass in SDLoc instead of DebugLoc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182703 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
225ed7069caae9ece32d8bd3d15c6e41e21cc04b 18-May-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Add LLVMContext argument to getSetCCResultType

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182180 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6265d5c91a18b2fb6499eb581c488315880c044d 20-Apr-2013 Tim Northover <Tim.Northover@arm.com> Remove unused MEMBARRIER DAG node; it's been replaced by ATOMIC_FENCE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7a58099f0a4c9503f400f6b81590a5f6b73d4b97 08-Mar-2013 Benjamin Kramer <benny.kra@googlemail.com> Remove default from fully covered switch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176703 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
03abf2f2aa77ddd23b74e431005bf773ce1cf0aa 08-Mar-2013 Tom Stellard <thomas.stellard@amd.com> LegalizeDAG: Respect the result of TLI.getBooleanContents() when expanding SETCC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176695 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ad4da0fc321230261b4d0387f0ec216eb8aa50ca 20-Feb-2013 Benjamin Kramer <benny.kra@googlemail.com> Move the SplatByte helper to APInt and generalize it a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
631dd86804c3e74652d555b82ffe2f4750c81d68 16-Feb-2013 Jakub Staszak <kubastaszak@gmail.com> LegalizeDAG.cpp doesn't need DenseMap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175365 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
86cdbc9c29a572d422815f55fd89ff7510d1e3e8 15-Feb-2013 Paul Redmond <paul.redmond@intel.com> enable SDISel sincos optimization for GNU environments

- add sincos to runtime library if target triple environment is GNU
- added canCombineSinCosLibcall() which checks that sincos is in the RTL and
if the environment is GNU then unsafe fpmath is enabled (required to
preserve errno)
- extended sincos-opt lit test

Reviewed by: Hal Finkel


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175283 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8688a58c53b46d2dda9bf50dafd5195790a7ed58 29-Jan-2013 Evan Cheng <evan.cheng@apple.com> Teach SDISel to combine fsin / fcos into a fsincos node if the following
conditions are met:
1. They share the same operand and are in the same BB.
2. Both outputs are used.
3. The target has a native instruction that maps to ISD::FSINCOS node or
the target provides a sincos library call.

Implemented the generic optimization in sdisel and enabled it for
Mac OSX. Also added an additional optimization for x86_64 Mac OSX by
using an alternative entry point __sincos_stret which returns the two
results in xmm0 / xmm1.

rdar://13087969
PR13204


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173755 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0a29cb045444c13160e90fe7942a9d7c720185ed 22-Jan-2013 Tim Northover <Tim.Northover@arm.com> Make APFloat constructor require explicit semantics.

Previously we tried to infer it from the bit width size, with an added
IsIEEE argument for the PPC/IEEE 128-bit case, which had a default
value. This default value allowed bugs to creep in, where it was
inappropriate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2c8cf4b404e549482f593f62f9e27e0bab4a8b3f 09-Jan-2013 Tim Northover <Tim.Northover@arm.com> Refactor to expose RTLIB calls to targets.

fp128 is almost but not quite completely illegal as a type on AArch64. As a
result it needs to have a register class (for argument passing mainly), but all
operations need to be lowered to runtime calls. Currently there's no way for
targets to do this (without duplicating code), as the relevant functions are
hidden in SelectionDAG. This patch changes that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
24d315dc053e8130593a8053bd6dc0245632f5f3 08-Jan-2013 Tim Northover <Tim.Northover@arm.com> Add fp128 rtlib function names to LLVM

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
40b2c32475572d33ede7cf202f2d49cab9b43bb4 08-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Sink a function that refers to the SelectionDAG into that library in the
one file where it is called as a static function. Nuke the declaration
and the definition in lib/CodeGen, along with the include of
SelectionDAG.h from this file.

There is no dependency edge from lib/CodeGen to
lib/CodeGen/SelectionDAG, so it isn't valid for a routine in lib/CodeGen
to reference the DAG. There is a dependency from
lib/CodeGen/SelectionDAG on lib/CodeGen. This breaks one violation of
this layering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0b8c9a80f20772c3793201ab5b251d3520b9cea3 02-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Move all of the header files which are involved in modelling the LLVM IR
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long standing point
of file layout clutter in LLVM.

There are still more header files to move here, but I wanted to handle
them in separate commits to make tracking what files make sense at each
layer easier.

The only really questionable files here are the target intrinsic
tablegen files. But that's a battle I'd rather not fight today.

I've updated both CMake and Makefile build systems (I think, and my
tests think, but I may have missed something).

I've also re-sorted the includes throughout the project. I'll be
committing updates to Clang, DragonEgg, and Polly momentarily.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
dfcf33a287d1756721f1f735af687595ce2f5a21 19-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Change TargetLowering::RegisterTypeForVT to contain MVTs, instead of
EVTs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
319bb399233d3ee67233aa29235c8ad2148fb77d 19-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Change TargetLowering::getTypeToPromoteTo to take and return MVTs,
instead of EVTs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170529 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9c5ab9355e00686e120e12952908ea8ad981d776 19-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Change TargetLowering::getCondCodeAction to take an MVT, instead of
EVT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
88ef514cc63c3f22f78eaf4dd295d349b4070819 19-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Change TargetLowering::getTruncStoreAction to take MVTs, instead of EVTs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
702474dbb2d4fbaf7b93bcccd71b7b80a8ec2817 14-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Change TargetLowering::getLoadExtAction to take an MVT, instead of
EVT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170183 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
34525f9ac098c1c6bc9002886d6da3039a284fd2 11-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Revert EVT->MVT changes, r169836-169851, due to buildbot failures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2d916231ff503b995bf3b65a338c9bf0d84ee7c7 11-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Change TargetLowering::RegisterTypeForVT to contain MVTs, instead of
EVTs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bb2543bb0e38495cd655be3eadcb9dd008ac56d2 11-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Change TargetLowering::getTypeToPromoteTo to take and return MVTs,
instead of EVTs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169844 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
aff674331ebb54e74baa88532ee587d741a430a2 11-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Change TargetLowering::getCondCodeAction to take an MVT, instead of
EVT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3166283ac169e86e9718bee69850b94c1bc27727 11-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Change TargetLowering::getTruncStoreAction to take MVTs, instead of EVTs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169841 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ffa03b7981e322d6c9ba8b9cc18cae282ce3b587 11-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Change TargetLowering::getLoadExtAction to take an MVT, instead of EVT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169840 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f45d11b56bffeaec94291f330dc9f7f7aae5a741 10-Dec-2012 Tom Stellard <thomas.stellard@amd.com> LegalizeDAG: Allow type promotion of scalar loads

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8b7f16e9719a64973e3b4d35e122222c26839c44 10-Dec-2012 Tom Stellard <thomas.stellard@amd.com> LegalizeDAG: Allow type promotion for scalar stores

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169772 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d04a8d4b33ff316ca4cf961e06c9e312eff8e64f 03-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Use the new script to sort the includes of every file under lib.

Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b8bce928f4ffdf50eff69334f3e25b27848536b6 24-Oct-2012 Micah Villmow <villmow@gmail.com> Back out r166591, not sure why this made it through since I cancelled the command. Bleh, sorry about this!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2f87640b86315beab8a5671cc23f524e59c58bd3 24-Oct-2012 Micah Villmow <villmow@gmail.com> Delete a directory that wasn't supposed to be checked in yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166591 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
cfc6cb0c61ef78aad2f63b634b0a6f377361858b 20-Oct-2012 Shuxin Yang <shuxin.llvm@gmail.com> 1. Remove noreturn attribute from __builtin_debugtrap().
(The change at Clang side was committed in r166345)

2. Cosmetic change in order to conform to coding standards.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
970755e5197afb42a76a24a74cd6dc17721daf50 19-Oct-2012 Shuxin Yang <shuxin.llvm@gmail.com> This patch is to fix radar://8426430. It is about llvm support of __builtin_debugtrap()
which is supposed to consistently raise SIGTRAP across all systems. In contrast,
__builtin_trap() behave differently on different systems. e.g. it raises SIGTRAP on ARM, and
SIGILL on X86. The purpose of __builtin_debugtrap() is to consistently provide "trap"
functionality, in the mean time preserve the compatibility with on gcc on __builtin_trap().

The X86 backend is already able to handle debugtrap(). This patch is to:
1) make front-end recognize "__builtin_debugtrap()" (emboddied in the one-line change to Clang).
2) In DAG legalization phase, by default, "debugtrap" will be replaced with "trap", which
make the __builtin_debugtrap() "available" to all existing ports without the hassle of
changing their code.
3) If trap-function is specified (via -trap-func=xyz to llc), both __builtin_debugtrap() and
__builtin_trap() will be expanded into the function call of the specified trap function.
This behavior may need change in the future.

The provided testing-case is to make sure 2) and 3) are working for ARM port, and we
already have a testing case for x86.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d36696c4e0ccd10a91bad2e3383c50347e2ea5ec 12-Oct-2012 Evan Cheng <evan.cheng@apple.com> Legalizer optimize a pair of div / mod to a call to divrem libcall if they are
not legal. However, it should use a div instruction + mul + sub if divide is
legal. The rem legalization code was missing a check and incorrectly uses a
divrem libcall even when div is legal.

rdar://12481395


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d6458a0aa12ef831ff45d1ce55a89a70ed091cbe 10-Oct-2012 Micah Villmow <villmow@gmail.com> Add in support for expansion of all of the comparison operations to the absolute minimum required set. This allows a backend to expand any arbitrary set of comparisons as long as a minimum set is supported.
The minimum set of required instructions is ISD::AND, ISD::OR, ISD::SETO(or ISD::SETOEQ) and ISD::SETUO(or ISD::SETUNE). Everything is expanded into one of two patterns:
Pattern 1: (LHS CC1 RHS) Opc (LHS CC2 RHS)
Pattern 2: (LHS CC1 LHS) Opc (RHS CC2 RHS)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165655 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3574eca1b02600bac4e625297f4ecf745f4c4f32 08-Oct-2012 Micah Villmow <villmow@gmail.com> Move TargetData to DataLayout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
fe257cc8af0859b0a92a6ba195382e1f9e1ea9aa 18-Sep-2012 Evan Cheng <evan.cheng@apple.com> Fix some funky indentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1d522388bfa642d710618edd3f4e9fe6471cf674 28-Aug-2012 Akira Hatanaka <ahatanaka@mips.com> Fix bug 13532.

In SelectionDAGLegalize::ExpandLegalINT_TO_FP, expand INT_TO_FP nodes without
using any f64 operations if f64 is not a legal type.

Patch by Stefan Kristiansson.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0b66bd9b078c99dfca6ba0836750cdc168f635d1 09-Aug-2012 Nadav Rotem <nadav.rotem@intel.com> Fix the legalization of ExtLoad on ARM. ExpandUnalignedLoad did not properly
handle the cases where the memory value type was illegal.
PR 13111.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4b24bf8da340ba30585777ab656c83752a5e3e6a 11-Jul-2012 Nadav Rotem <nadav.rotem@intel.com> Rename many of the Tmp1, Tmp2, Tmp3 variables to names such as Chain, Value, Ptr, etc.
No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160042 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a67306d21f235f14d99d31fa211536ad652086b1 11-Jul-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b6e89f0471c70215565f3d236d09732cd184c0ee 11-Jul-2012 Nadav Rotem <nadav.rotem@intel.com> Refactor the DAG Legalizer by extracting the legalization of
Load and Store nodes into their own functions.
No functional change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0bcbd1df7a204e1e512f1a27066d725309de1b13 28-Jun-2012 Bill Wendling <isanbard@gmail.com> Move lib/Analysis/DebugInfo.cpp to lib/VMCore/DebugInfo.cpp and
include/llvm/Analysis/DebugInfo.h to include/llvm/DebugInfo.h.

The reasoning is because the DebugInfo module is simply an interface to the
debug info MDNodes and has nothing to do with analysis.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159312 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8ef0968dc230f6fae8fcbd6dc4a5cb9ccc780b6b 21-Jun-2012 Evan Cheng <evan.cheng@apple.com> Emit a single _udivmodsi4 libcall instead of two separate _udivsi3 and
_umodsi3 libcalls if they have the same arguments. This optimization
was apparently broken if one of the node was replaced in place.
rdar://11714607


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
55a105160dc02a0d990a69820cfe63fef504195e 02-Jun-2012 Akira Hatanaka <ahatanaka@mips.com> Fix a bug in the code which custom-lowers truncating stores in LegalizeDAG.

Check that the SDValue TargetLowering::LowerOperation returns is not null
before replacing the original node with the returned node.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d2ea0e10cbd158c93fb870cdd03001b9cd1156b8 25-May-2012 Justin Holewinski <jholewinski@nvidia.com> Change interface for TargetLowering::LowerCallTo and TargetLowering::LowerCall
to pass around a struct instead of a large set of individual values. This
cleans up the interface and allows more information to be added to the struct
for future targets without requiring changes to each and every target.

NV_CONTRIB

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157479 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4b6e6750fed37879ce4730571cae1bfa342e8e02 22-May-2012 Owen Anderson <resistor@mac.com> Fix use of an unitialized value in the LegalizeOps expansion for ISD::SUB. No in-tree targets exercise this path.

Patch by Micah Villmow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
92d63ccfc7d86d39bc0b806bf7e9fac13dd2d7b5 20-May-2012 Peter Collingbourne <peter@pcc.me.uk> When legalising shifts, do not pre-build a list of operands which
may be RAUW'd by the recursive call to LegalizeOps; instead, retrieve
the other operands when calling UpdateNodeOperands. Fixes PR12889.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bc7d448f242b1bbc1031fb87cd69c285ff9aaffa 21-Apr-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Register DAGUpdateListeners with SelectionDAG.

Instead of passing listener pointers to RAUW, let SelectionDAG itself
keep a linked list of interested listeners.

This makes it possible to have multiple listeners active at once, like
RAUWUpdateListener was already doing. It also makes it possible to
register listeners up the call stack without controlling all RAUW calls
below.

DAGUpdateListener uses an RAII pattern to add itself to the SelectionDAG
list of active listeners.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b52ba49fdbf6cdf055e8b264c18b6e594fd30dc4 10-Apr-2012 Evan Cheng <evan.cheng@apple.com> Make the code slightly more palatable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bf010eb9110009d745382bf15131fbe556562ffe 10-Apr-2012 Evan Cheng <evan.cheng@apple.com> Fix a long standing tail call optimization bug. When a libcall is emitted
legalizer always use the DAG entry node. This is wrong when the libcall is
emitted as a tail call since it effectively folds the return node. If
the return node's input chain is not the entry (i.e. call, load, or store)
use that as the tail call input chain.

PR12419
rdar://9770785
rdar://11195178


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9751b81fc97dcb6ecc4be4304ef8e6e8cf79f6e4 04-Apr-2012 Pete Cooper <peter_cooper@apple.com> f16 FREM can now be legalized by promoting to f32

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5194d6dd9575845cf1cbb2f10a0c769634d116a9 24-Mar-2012 Hal Finkel <hfinkel@anl.gov> Add the ability to promote legal integer VAARGs. This is required for the PPC64 SVR4 ABI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
cfe2998c3e1a9ea66c9bab3bcf3f93960be304fd 20-Mar-2012 Pete Cooper <peter_cooper@apple.com> f16 FDIV can now be legalized by promoting to f32

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153064 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
afd3d56b9dc791d37120922318293a021bd35598 06-Mar-2012 Owen Anderson <resistor@mac.com> Make it possible for a target to mark FSUB as Expand. This requires providing a default expansion (FADD+FNEG), and teaching DAGCombine not to form FSUBs post-legalize if they are not legal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4bfcd4acbc7d12aa55f8de9af84a38422f0f6d83 28-Feb-2012 Evan Cheng <evan.cheng@apple.com> Re-commit r151623 with fix. Only issue special no-return calls if it's a direct call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
20bd5296cec8d8d597ab9db2aca7346a88e580c8 28-Feb-2012 Daniel Dunbar <daniel@zuster.org> Revert r151623 "Some ARM implementaions, e.g. A-series, does return stack prediction. ...", it is breaking the Clang build during the Compiler-RT part.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151630 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ec52aaa12f57896fc806e849fa21a61603050ac4 28-Feb-2012 Evan Cheng <evan.cheng@apple.com> Some ARM implementaions, e.g. A-series, does return stack prediction. That is,
the processor keeps a return addresses stack (RAS) which stores the address
and the instruction execution state of the instruction after a function-call
type branch instruction.

Calling a "noreturn" function with normal call instructions (e.g. bl) can
corrupt RAS and causes 100% return misprediction so LLVM should use a
unconditional branch instead. i.e.
mov lr, pc
b _foo
The "mov lr, pc" is issued in order to get proper backtrace.

rdar://8979299


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0796134bde31f6d58d077f556fd08ca3734a9e6e 14-Feb-2012 Lang Hames <lhames@gmail.com> Rename getExceptionAddressRegister() to getExceptionPointerRegister() for consistency with setExceptionPointerRegister(...).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5e25ee8a1fcf8288d00d731b0f7ab7976f33b123 05-Feb-2012 Craig Topper <craig.topper@gmail.com> Convert assert(0) to llvm_unreachable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4ca829e89567f002fc74eb0e3e532a7c7662e031 25-Jan-2012 Chris Lattner <sabre@nondot.org> use ConstantVector::getSplat in a few places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148929 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4d6ccb5f68cd7c6418a209f1fa4dbade569e4493 20-Jan-2012 David Blaikie <dblaikie@gmail.com> More dead code removal (using -Wunreachable-code)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ed4c8c633c52a40ad1a3e8687f290be4aeb1f0e8 15-Jan-2012 Benjamin Kramer <benny.kra@googlemail.com> Return an ArrayRef from ShuffleVectorSDNode::getMask and push it through CodeGen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d578b905de8f9dece45aab2496a88ac548c67348 12-Jan-2012 Pete Cooper <peter_cooper@apple.com> Added FPOW, FEXP, FLOG to PromoteNode so that custom actions can be set to Promote for those operations.

Sorry, no test case yet


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6c0366cb2588ae49ef6e2f892db2099d41d85391 10-Jan-2012 Nadav Rotem <nadav.rotem@intel.com> Fix a bug in the legalization of shuffle vectors. When we emulate shuffles using BUILD_VECTORS we may be using a BV of different type. Make sure to cast it back.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ce58a03587ca46d9c9fe48e2bf433bcd57bb2b3a 03-Jan-2012 Elena Demikhovsky <elena.demikhovsky@intel.com> Fixed a bug in SelectionDAG.cpp.
The failure seen on win32, when i64 type is illegal.
It happens on stage of conversion VECTOR_SHUFFLE to BUILD_VECTOR.

The failure message is:
llc: SelectionDAG.cpp:784: void VerifyNodeCommon(llvm::SDNode*): Assertion `(I->getValueType() == EltVT || (EltVT.isInteger() && I->getValueType().isInteger() && EltVT.bitsLE(I->getValueType()))) && "Wrong operand type!"' failed.

I added a special test that checks vector shuffle on win32.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147445 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
acae2a63b9ba943d37914813c601eb5fa9d84c22 01-Jan-2012 Rafael Espindola <rafael.espindola@gmail.com> Revert 147399. It broke CodeGen/ARM/vext.ll.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147400 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ac12855066ce2cfee11e68dcf0c15936f0730e6b 01-Jan-2012 Elena Demikhovsky <elena.demikhovsky@intel.com> Fixed a bug in SelectionDAG.cpp.
The failure seen on win32, when i64 type is illegal.
It happens on stage of conversion VECTOR_SHUFFLE to BUILD_VECTOR.

The failure message is:
llc: SelectionDAG.cpp:784: void VerifyNodeCommon(llvm::SDNode*): Assertion `(I->getValueType() == EltVT || (EltVT.isInteger() && I->getValueType().isInteger() && EltVT.bitsLE(I->getValueType()))) && "Wrong operand type!"' failed.

I added a special test that checks vector shuffle on win32.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147399 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
63974b2144c87c962effdc0508c27643c8ad98b6 13-Dec-2011 Chandler Carruth <chandlerc@gmail.com> Initial CodeGen support for CTTZ/CTLZ where a zero input produces an
undefined result. This adds new ISD nodes for the new semantics,
selecting them when the LLVM intrinsic indicates that the undef behavior
is desired. The new nodes expand trivially to the old nodes, so targets
don't actually need to do anything to support these new nodes besides
indicating that they should be expanded. I've done this for all the
operand types that I could figure out for all the targets. Owners of
various targets, please review and let me know if any of these are
incorrect.

Note that the expand behavior is *conservatively correct*, and exactly
matches LLVM's current behavior with these operations. Ideally this
patch will not change behavior in any way. For example the regtest suite
finds the exact same instruction sequences coming out of the code
generator. That's why there are no new tests here -- all of this is
being exercised by the existing test suite.

Thanks to Duncan Sands for reviewing the various bits of this patch and
helping me get the wrinkles ironed out with expanding for each target.
Also thanks to Chris for clarifying through all the discussions that
this is indeed the approach he was looking for. That said, there are
likely still rough spots. Further review much appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c80383095e1fd6a5567a0126b3ee551df8a2aacd 28-Nov-2011 Bill Wendling <isanbard@gmail.com> Remove dead llvm.eh.sjlj.dispatchsetup intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b91b6001a63ea22cdad1a5392cb2b8a604d8219c 16-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Add a couple asserts so it will be easier to debug if we accidentally pass indexed loads/stores to the legalizer.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144767 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0e3642a58746a26f50709179a2bcb25f335e2dac 12-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Some cleanup and bulletproofing for node replacement in LegalizeDAG. To maintain LegalizeDAG invariants, whenever we a node is replaced, we must attempt to delete it, and if it still
has uses after it is replaced (which can happen in rare cases due to CSE), we must revisit it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144432 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d752e0f7e64585839cb3a458ef52456eaebbea3c 08-Nov-2011 Pete Cooper <peter_cooper@apple.com> Added invariant field to the DAG.getLoad method and changed all calls.

When this field is true it means that the load is from constant (runt-time or compile-time) and so can be hoisted from loops or moved around other memory accesses


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2efa35f779213a828fa15d6aa3a508fc81d75d73 08-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Add a bunch of calls to RemoveDeadNode in LegalizeDAG, so legalization doesn't get confused by CSE later on. Fixes PR11318.

Re-commit of r144034, with an extra fix so that RemoveDeadNode doesn't blow up.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
58dd0fec4d4b8b1dc87e8a6a080b776d0d425cad 08-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Revert r144034 while I try to track down a crash.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1b4f6f2532e9a6a99fcab5fde5b4a2187c9c9c2b 07-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Add a bunch of calls to RemoveDeadNode in LegalizeDAG, so legalization doesn't get confused by CSE later on. Fixes PR11318.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
65fd6564b8aedd053845c81ede1ac594acb470e4 03-Nov-2011 Dan Gohman <gohman@apple.com> Reapply r143206, with fixes. Disallow physical register lifetimes
across calls, and only check for nested dependences on the special
call-sequence-resource register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143660 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6f3ddef7c51f03945644ad0e69068dfb24d4b092 29-Oct-2011 Dan Gohman <gohman@apple.com> Revert r143206, as there are still some failing tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143262 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bf923b815d6da97367e3eedab69230918bf128a3 28-Oct-2011 Dan Gohman <gohman@apple.com> Reapply r143177 and r143179 (reverting r143188), with scheduler
fixes: Use a separate register, instead of SP, as the
calling-convention resource, to avoid spurious conflicts with
actual uses of SP. Also, fix unscheduling of calling sequences,
which can be triggered by pseudo-two-address dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
62c1d00dfd38996f381edae55e1028b8e52a1107 28-Oct-2011 Duncan Sands <baldrick@free.fr> Speculatively disable Dan's commits 143177 and 143179 to see if
it fixes the dragonegg self-host (it looks like gcc is miscompiled).
Original commit messages:
Eliminate LegalizeOps' LegalizedNodes map and have it just call RAUW
on every node as it legalizes them. This makes it easier to use
hasOneUse() heuristics, since unneeded nodes can be removed from the
DAG earlier.

Make LegalizeOps visit the DAG in an operands-last order. It previously
used operands-first, because LegalizeTypes has to go operands-first, and
LegalizeTypes used to be part of LegalizeOps, but they're now split.
The operands-last order is more natural for several legalization tasks.
For example, it allows lowering code for nodes with floating-point or
vector constants to see those constants directly instead of seeing the
lowered form (often constant-pool loads). This makes some things
somewhat more complicated today, though it ought to allow things to be
simpler in the future. It also fixes some bugs exposed by Legalizing
using RAUW aggressively.

Remove the part of LegalizeOps that attempted to patch up invalid chain
operands on libcalls generated by LegalizeTypes, since it doesn't work
with the new LegalizeOps traversal order. Instead, define what
LegalizeTypes is doing to be correct, and transfer the responsibility
of keeping calls from having overlapping calling sequences into the
scheduler.

Teach the scheduler to model callseq_begin/end pairs as having a
physical register definition/use to prevent calls from having
overlapping calling sequences. This is also somewhat complicated, though
there are ways it might be simplified in the future.

This addresses rdar://9816668, rdar://10043614, rdar://8434668, and others.
Please direct high-level questions about this patch to management.

Delete #if 0 code accidentally left in.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3799efab8c028c8928bf55ddd7d39da0e6b62cea 28-Oct-2011 Dan Gohman <gohman@apple.com> Delete #if 0 code accidentally left in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143179 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2ba60e593012ba9b2a9d20b86733eadca288bcb2 28-Oct-2011 Dan Gohman <gohman@apple.com> Eliminate LegalizeOps' LegalizedNodes map and have it just call RAUW
on every node as it legalizes them. This makes it easier to use
hasOneUse() heuristics, since unneeded nodes can be removed from the
DAG earlier.

Make LegalizeOps visit the DAG in an operands-last order. It previously
used operands-first, because LegalizeTypes has to go operands-first, and
LegalizeTypes used to be part of LegalizeOps, but they're now split.
The operands-last order is more natural for several legalization tasks.
For example, it allows lowering code for nodes with floating-point or
vector constants to see those constants directly instead of seeing the
lowered form (often constant-pool loads). This makes some things
somewhat more complicated today, though it ought to allow things to be
simpler in the future. It also fixes some bugs exposed by Legalizing
using RAUW aggressively.

Remove the part of LegalizeOps that attempted to patch up invalid chain
operands on libcalls generated by LegalizeTypes, since it doesn't work
with the new LegalizeOps traversal order. Instead, define what
LegalizeTypes is doing to be correct, and transfer the responsibility
of keeping calls from having overlapping calling sequences into the
scheduler.

Teach the scheduler to model callseq_begin/end pairs as having a
physical register definition/use to prevent calls from having
overlapping calling sequences. This is also somewhat complicated, though
there are ways it might be simplified in the future.

This addresses rdar://9816668, rdar://10043614, rdar://8434668, and others.
Please direct high-level questions about this patch to management.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e9b58d0aac4e89b53a4be0e6f289b66649e1512b 15-Oct-2011 Nadav Rotem <nadav.rotem@intel.com> Move the legalization of vector loads and stores into LegalizeVectorOps. In some
cases we need the second type-legalization pass in order to support all cases.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6fe4e515470a9c2ffa1324261674dde0ede32e72 11-Oct-2011 Nadav Rotem <nadav.rotem@intel.com> Add support for legalization of vector SHL/SRA/SRL instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
884b918c2d7ed8dbd804bda72f25729f84a16ab0 11-Oct-2011 Nadav Rotem <nadav.rotem@intel.com> Add support for legalization of vector trunc-store where the saved scalar type is illegal (for example, v2i16 on systems where the smallest store size is i32)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141661 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c2b2e1333d66e37c657e25fc09dc79e4ea1d79d9 11-Oct-2011 Nadav Rotem <nadav.rotem@intel.com> Cleanup the trunc-store legalization code and add asserts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141659 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
cbf26e3b574366fabfda50222817950b85517608 01-Oct-2011 Nadav Rotem <nadav.rotem@intel.com> Moved type construction out of the loop and added an assert on the legality of the type. Formatted lines to the 80 char limit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a1c415cfc2dba4446021f322e4b7a43534a96f1a 27-Sep-2011 Nadav Rotem <nadav.rotem@intel.com> Revert r140463; The patch assumes that <4 x i1> is saved to memory as 4 x i8,
while the decision is to bit-pack small values.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0d5357e3d5bd3edbe4ad09791e69e1fb85d4b17f 24-Sep-2011 Nadav Rotem <nadav.rotem@intel.com> [Vector-Select] Address one of the problems in 10902.

When generating the trunc-store of i1's, we need to use the vector type and not
the scalar type.

This patch fixes the assertion in CodeGen/Generic/bool-vector.ll when
running with -promote-elements.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
331120b1a482b782e8dffce63033bb8514ba2a96 15-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Some legalization fixes for atomic load and store.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4a544a79bd735967f1d33fe675ae4566dbd17813 06-Sep-2011 Duncan Sands <baldrick@free.fr> Split the init.trampoline intrinsic, which currently combines GCC's
init.trampoline and adjust.trampoline intrinsics, into two intrinsics
like in GCC. While having one combined intrinsic is tempting, it is
not natural because typically the trampoline initialization needs to
be done in one function, and the result of adjust trampoline is needed
in a different (nested) function. To get around this llvm-gcc hacks the
nested function lowering code to insert an additional parent variable
holding the adjust.trampoline result that can be accessed from the child
function. Dragonegg doesn't have the luxury of tweaking GCC code, so it
stored the result of adjust.trampoline in the memory GCC set aside for
the trampoline itself (this is always available in the child function),
and set up some new memory (using an alloca) to hold the trampoline.
Unfortunately this breaks Go which allocates trampoline memory on the
heap and wants to use it even after the parent has exited (!). Rather
than doing even more hacks to get Go working, it seemed best to just use
two intrinsics like in GCC. Patch mostly by Sanjoy Das.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139140 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6b13cd415493187b4c597fc1a60fae314067cdb2 02-Sep-2011 Dan Gohman <gohman@apple.com> Revert r131152, r129796, r129761. This code is currently considered
to be unreliable on platforms which require memcpy calls, and it is
complicating broader legalize cleanups. It is hoped that these cleanups
will make memcpy byval easier to implement in the future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
069e2ed794a90cb5108a35627ee148866795f140 26-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Atomic load/store on ARM/Thumb.

I don't really like the patterns, but I'm having trouble coming up with a
better way to handle them.

I plan on making other targets use the same legalization
ARM-without-memory-barriers is using... it's not especially efficient, but
if anyone cares, it's not that hard to fix for a given target if there's
some better lowering.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
327236cd6c211e54fc6288b0ac2b413901cc0611 24-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Basic x86 code generation for atomic load and store instructions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
14648468011c92a4210f8118721d58c25043daf8 28-Jul-2011 Eli Friedman <eli.friedman@gmail.com> Code generation for 'fence' instruction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136283 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
cbdccdeea96f26198fc8225c1a32c04ca01f8a26 27-Jul-2011 Dan Gohman <gohman@apple.com> Revert r136156, which broke several buildbots.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c680b92460abaa8daa7796c05447f64b01b9f11b 27-Jul-2011 Dan Gohman <gohman@apple.com> Delete unnecessarily cautious LastCALLSEQ code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136156 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
db125cfaf57cc83e7dd7453de2d509bc8efd0e5e 18-Jul-2011 Chris Lattner <sabre@nondot.org> land David Blaikie's patch to de-constify Type, with a few tweaks.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e63e5ab50ab37fd59cc6e815fffcb90e75537ca3 16-Jul-2011 Dan Gohman <gohman@apple.com> LegalizeDAG doesn't need its own copy of this enum.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135320 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
75b10047fc57c30c86bb7c9ea0ee923ff3c33a7e 16-Jul-2011 Dan Gohman <gohman@apple.com> Delete LegalizeDAG's own version of isTypeLegal and getTypeAction
and just use the ones from TargetLowering directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ea0270298de4d2a4186454fc39a6836e99271f1d 16-Jul-2011 Dan Gohman <gohman@apple.com> Delete an unused variable and a redundant assert.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135311 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6a109f9d70bf7f75541400145a7a89880cc48166 15-Jul-2011 Dan Gohman <gohman@apple.com> Modernize comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135305 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
33390848a7eca75301d04a59b89b516d83e19ee0 08-Jul-2011 Cameron Zwarich <zwarich@apple.com> Add an intrinsic and codegen support for fused multiply-accumulate. The intent
is to use this for architectures that have a native FMA instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134742 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c2492c28ef04dbc77c5d47ec81ffc64c5407771f 14-Jun-2011 Nadav Rotem <nadav.rotem@intel.com> Add a testcase for checking the integer-promotion of many different vector
types (with power of two types such as 8,16,32 .. 512).

Fix a bug in the integer promotion of bitcast nodes. Enable integer expanding
only if the target of the conversion is an integer (when the type action is
scalarize).

Add handling to the legalization of vector load/store in cases where the saved
vector is integer-promoted.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2d6dcb34b7f39682f3eed08180631189fb4b6636 27-May-2011 Nadav Rotem <nadav.rotem@intel.com> Refactor getActionType and getTypeToTransformTo ; place all of the 'decision'
code in one place. Re-apply 131534 and fix the multi-step promotion of integers.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132217 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d6dde76090dd673a673ce363c982c22ea924502a 18-May-2011 Duncan Sands <baldrick@free.fr> Revert commit 131534 since it seems to have broken several buildbots.
Original log entry:
Refactor getActionType and getTypeToTransformTo ; place all of the 'decision'
code in one place.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
fe3f5d7538954474731dbbed70430016600fa477 18-May-2011 Nadav Rotem <nadav.rotem@intel.com> Refactor getActionType and getTypeToTransformTo ; place all of the 'decision'
code in one place.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1b32896bd2a6e001c8513fcf182d5a92ab7d487a 18-May-2011 Dan Gohman <gohman@apple.com> Misc. code cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
975716af1b9a09274df6c2d92683449015bd8564 17-May-2011 Dan Gohman <gohman@apple.com> Delete unused variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131430 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b3dbd4a0b61d9c26df358384bdb66a41326f1a9d 17-May-2011 Dan Gohman <gohman@apple.com> Trim #includes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131429 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f316eb70743e88227b8919370fe38587ffe93512 17-May-2011 Dan Gohman <gohman@apple.com> Fix whitespace and 80-column violations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
88882247d2e1bb70103062faf5bd15dd8a30b2d1 13-May-2011 Stuart Hastings <stuart@apple.com> Since I can't reproduce the failures from 131261, re-trying with a
simplified version. <rdar://problem/9298790>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8ad145d7299dbeb8b816ce0549d9323630bbae1a 13-May-2011 Stuart Hastings <stuart@apple.com> Revert 131266 and 131261 due to buildbot complaints.
rdar://problem/9298790


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131269 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5adc64638084c1b8d33ac56e2498b83f1f4bd6e2 13-May-2011 Stuart Hastings <stuart@apple.com> Non-fast-isel followup to 129634; correctly handle branches controlled
by non-CMP expressions. The executable test case (129821) would test
this as well, if we had an "-O0 -disable-arm-fast-isel" LLVM-GCC
tester. Alas, the ARM assembly would be very difficult to check with
FileCheck.

The thumb2-cbnz.ll test is affected; it generates larger code (tst.w
vs. cmp #0), but I believe the new version is correct.
rdar://problem/9298790


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d673057c968ee6da2fc9084a26cbd1a500002d2b 10-May-2011 Stuart Hastings <stuart@apple.com> Correctly walk through nested and adjacent CALLSEQ_START nodes. No
test case; I've only seen this on a release branch, and I can't get it
to reproduce on trunk. rdar://problem/7662569


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131152 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
abbbfbd6726c7af8b27479b4311fe6bb6c40b52b 20-Apr-2011 Eric Christopher <echristo@apple.com> Rewrite the expander for umulo/smulo to remember to sign extend the input
manually and pass all (now) 4 arguments to the mul libcall. Add a new
ExpandLibCall for just this (copied gratuitously from type legalization).

Fixes rdar://9292577


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
567cac0c511c2361ddb76eb4b8d49d306107a921 19-Apr-2011 Stuart Hastings <stuart@apple.com> Delete unnecessary variable. <rdar://problem/7662569>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
fc52163a45b9ea147db1c20a1db3edff0f0bf652 19-Apr-2011 Stuart Hastings <stuart@apple.com> Support nested CALLSEQ_BEGIN/END; necessary for ARM byval support. <rdar://problem/7662569>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129761 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
65279cb9bd985721ac6ad090fed02298396ba06d 16-Apr-2011 Evan Cheng <evan.cheng@apple.com> Fix divmod libcall lowering. Convert to {S|U}DIVREM first and then expand the node to a libcall. rdar://9280991

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7a2bdde0a0eebcd2125055e0eacaca040f0b766c 15-Apr-2011 Chris Lattner <sabre@nondot.org> Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1809d5fa216bbdc505502468b7bd85629e1e44bc 05-Apr-2011 Stuart Hastings <stuart@apple.com> Revert 123704; it broke threaded LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8e23e815ad1136721acdfcce76975a37c8a2c036 01-Apr-2011 Evan Cheng <evan.cheng@apple.com> Issue libcalls __udivmod*i4 / __divmod*i4 for div / rem pairs.

rdar://8911343


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6154f6c9292179fab6346ae8336f2ad790b52028 07-Mar-2011 Owen Anderson <resistor@mac.com> Use the correct LHS type when determining the legalization of a shift's RHS type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
95771afbfd604ad003fa3723cac66c9370fed55d 25-Feb-2011 Owen Anderson <resistor@mac.com> Allow targets to specify a the type of the RHS of a shift parameterized on the type of the LHS.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126518 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a778f5c798fc78ca15f813c362cdcdcc1eb86266 18-Feb-2011 Devang Patel <dpatel@apple.com> Do not lose debug info of an inlined function argument even if the argument is only used through GEPs.
This time with a fix that avoids using invalidated DenseMap iterator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1646953538d5faf7baf49e16bd0590f822c231de 18-Feb-2011 Cameron Zwarich <zwarich@apple.com> Roll out r125794 to help diagnose the llvm-gcc-i386-linux-selfhost failure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a4defc00ebf30f136ea96084b6a10c57441de6e7 18-Feb-2011 Devang Patel <dpatel@apple.com> Do not lose debug info of an inlined function argument even if the argument is only used through GEPs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a901129169194881a78b7fd8953e09f55b846d10 16-Feb-2011 Stuart Hastings <stuart@apple.com> Swap VT and DebugLoc operands of getExtLoad() for consistency with
other getNode() methods. Radar 9002173.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125665 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7e7fc1052afa9a7b5bcc94d50bc5f0403a6e7470 27-Jan-2011 Devang Patel <dpatel@apple.com> Speculatively revert r124380.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bfae5f312c5a726687b4f2201681fb5519568e14 27-Jan-2011 Devang Patel <dpatel@apple.com> While legalizing SDValues do not drop SDDbgValues, trasfer them to new legal nodes.

Take 2. This includes fix for dragonegg crash.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124380 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6b9a293a0c7d86c07d704da5facb34cc03ce1d02 26-Jan-2011 Bill Wendling <isanbard@gmail.com> Initialize variable to get rid of clang warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c47fd9fbf5d5179363eadde3c3ef57f8094c19e3 26-Jan-2011 Devang Patel <dpatel@apple.com> Revert r124302


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124320 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
cfe33c46aa50f04adb0431243e7d25f79b719ac6 26-Jan-2011 David Greene <greened@obbligato.org> [AVX] Add INSERT_SUBVECTOR and support it on x86. This provides a
default implementation for x86, going through the stack in a similr
fashion to how the codegen implements BUILD_VECTOR. Eventually this
will get matched to VINSERTF128 if AVX is available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124307 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d2c9793bdf3fe621eee9330f9977be256301b5bf 26-Jan-2011 Devang Patel <dpatel@apple.com> While legalizing SDValues do not drop SDDbgValues, trasfer them to new legal nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124302 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e3385811aaf1e7ff548c1f1edc6a85d034909a5c 20-Jan-2011 Eric Christopher <echristo@apple.com> Use only one API at a time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
38a18261b97a0b7e0ed75b1c8edd81ec9bd01085 20-Jan-2011 Eric Christopher <echristo@apple.com> If we can, lower the multiply part of a umulo/smulo call to a libcall
with an invalid type then split the result and perform the overflow check
normally.

Fixes the 32-bit parts of rdar://8622122 and rdar://8774702.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f22432282c78a65828cd9da94028e8b798858180 18-Jan-2011 Stuart Hastings <stuart@apple.com> Remove checking that prevented overlapping CALLSEQ_START/CALLSEQ_END
ranges, add legalizer support for nested calls. Necessary for ARM
byval support. Radar 7662569.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5df5a22d1a098961edebac59fbddcab045fddd29 15-Jan-2011 Benjamin Kramer <benny.kra@googlemail.com> Add an assert so we don't silently miscompile ctpop for bit widths > 128.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123549 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b6516aeef12a05aa47515f76e18fc426d85babbd 15-Jan-2011 Benjamin Kramer <benny.kra@googlemail.com> Reimplement CTPOP legalization with the "best" algorithm from
http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel

In a silly microbenchmark on a 65 nm core2 this is 1.5x faster than the old
code in 32 bit mode and about 2x faster in 64 bit mode. It's also a lot shorter,
especially when counting 64 bit population on a 32 bit target.

I hope this is fast enough to replace Kernighan-style counting loops even when
the input is rather sparse.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
dd11ea4a372b992775f67b64fb703edf2de0d27b 13-Jan-2011 Dan Gohman <gohman@apple.com> Fix r123346 to handle scalar types too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b86654385a394d8bdfe0cd6e3b5d57e9f3cb0eae 13-Jan-2011 Dan Gohman <gohman@apple.com> Apply the patch from PR8958, which allows llc to get slightly
further on the associated testcase before aborting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
16c29b5f285f375be53dabaa73e3e91107485fe4 10-Jan-2011 Anton Korobeynikov <asl@math.spbu.ru> Rename TargetFrameInfo into TargetFrameLowering. Also, put couple of FIXMEs and fixes here and there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2d31d14bace4cf225e997c78daefccc52e38186c 04-Jan-2011 Eric Christopher <echristo@apple.com> Remove TODO, these appear to be implemented.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
56500edc7a2599e651d39df71a714e1e255ed96a 21-Dec-2010 Stuart Hastings <stuart@apple.com> Fix indentation, add comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122345 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2965e69e040d86002128b91a439eb9bfc6b83df1 21-Dec-2010 Stuart Hastings <stuart@apple.com> Missing logic for nested CALLSEQ_START/END.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f1b4eafbfec976f939ec0ea3e8acf91cef5363e3 21-Dec-2010 Chris Lattner <sabre@nondot.org> rename MVT::Flag to MVT::Glue. "Flag" is a terrible name for
something that just glues two nodes together, even if it is
sometimes used for flags.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122310 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a304d02791b3e0297a9d545e0c602c9f916691f9 09-Dec-2010 Stuart Hastings <stuart@apple.com> Initial support for nested CALLSEQ_START/CALLSEQ_END constructs in LegalizeDAG.
Necessary for byval support on ARM. Radar 7662569.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
40f8f6264d5af2c38e797e0dc59827cd231e8ff7 07-Dec-2010 Jay Foad <jay.foad@gmail.com> PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method
trunc(), to be const and to return a new value instead of modifying the
object in place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3069cbf7b3ef9a31bbb8e434686b7259052c364a 04-Dec-2010 Benjamin Kramer <benny.kra@googlemail.com> Remove unneeded zero arrays.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120910 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3d2125c9dbac695c93f42c0f59fd040e413fd711 01-Dec-2010 Evan Cheng <evan.cheng@apple.com> Enable sibling call optimization of libcalls which are expanded during
legalization time. Since at legalization time there is no mapping from
SDNode back to the corresponding LLVM instruction and the return
SDNode is target specific, this requires a target hook to check for
eligibility. Only x86 and ARM support this form of sibcall optimization
right now.
rdar://8707777


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bf17cfa3f904e488e898ac2e3af706fd1a892f08 23-Nov-2010 Wesley Peck <peckw@wesleypeck.com> Renaming ISD::BIT_CONVERT to ISD::BITCAST to better reflect the LLVM IR concept.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e4ad387a5a88dae20f0f7578e55170bbc8eee2a9 20-Oct-2010 Jim Grosbach <grosbach@apple.com> Add a pre-dispatch SjLj EH hook on the unwind edge for targets to do any
setup they require. Use this for ARM/Darwin to rematerialize the base
pointer from the frame pointer when required. rdar://8564268

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
07e3a38c78d2788e05d716e7fa552b9449c87c33 10-Oct-2010 Chris Lattner <sabre@nondot.org> fix the default va_arg expansion (in the realignment case) to not implicitly
truncate the stack pointer to 32-bits on a 64-bit machine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116169 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3a9e7690ba99c27d9b09fa8e61fb9f7ba01364c9 05-Oct-2010 Owen Anderson <resistor@mac.com> Use a more efficient lowering of uint64_t --> float that can take advantage of hardware signed integer conversion without
having to do a double cast (uint64_t --> double --> float). This is based on the algorithm from compiler_rt's __floatundisf
for X86-64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6229d0acb8f395552131a7015a5d1e7b2bae2111 21-Sep-2010 Chris Lattner <sabre@nondot.org> update a bunch of code to use the MachinePointerInfo version of getStore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114461 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
da2d8e1032eb4c2fefb1f647d7877910b9483835 21-Sep-2010 Chris Lattner <sabre@nondot.org> eliminate an old SelectionDAG::getTruncStore method, propagating
MachinePointerInfo around more.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3d6ccfba314ed38e4506dae2781a060e9a3e07ac 21-Sep-2010 Chris Lattner <sabre@nondot.org> propagate MachinePointerInfo through various uses of the old
SelectionDAG::getExtLoad overload, and eliminate it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ecf42c4720aba6ee315d0166045c54187ac2de4d 21-Sep-2010 Chris Lattner <sabre@nondot.org> continue MachinePointerInfo'izing, eliminating use of one of the old
getLoad overloads.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
85ca1066328639119f94c47a83b698c48b84ebb0 21-Sep-2010 Chris Lattner <sabre@nondot.org> a few more trivial updates. This fixes PerformInsertVectorEltInMemory to not
pass a completely incorrect SrcValue, which would result in a miscompile with
combiner-aa.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114411 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ef134d02e0036ef981983d4b5e40c678dd241583 03-Sep-2010 Bob Wilson <bob.wilson@apple.com> Add a missing check when legalizing a vector extending load. This doesn't
solve the root problem, but it corrects the bug in the code I added to
support legalizing in the case where the non-extended type is also legal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112997 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
341fa09a3c842e8a0df3510d3f9af186ede976c9 26-Aug-2010 Chris Lattner <sabre@nondot.org> Add a hackaround for PR7993 which is causing failures on x86 builders that lack sse2.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112175 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
aafe626c7fa9f99150cccd27d0151a2cf7c8c00b 26-Aug-2010 Chris Lattner <sabre@nondot.org> remove some llvmcontext arguments that are now dead post-refactoring.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
54f616304240fcbc41ca9b9b2af38eeb1171e8a8 23-Aug-2010 Chandler Carruth <chandlerc@gmail.com> Fix some GCC warnings by providing a virtual destructor in the base of a class
hierarchy with virtual methods and using llvm_unreachable to properly indicate
unreachable states which would otherwise leave variables uninitialized.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111803 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
63241f79e667feafb10936b7c2cf03c33f55dd01 20-Aug-2010 Bob Wilson <bob.wilson@apple.com> If the target says that an extending load is not legal, regardless of whether
it involves specific floating-point types, legalize should expand an
extending load to a non-extending load followed by a separate extend operation.
For example, we currently expand SEXTLOAD to EXTLOAD+SIGN_EXTEND_INREG (and
assert that EXTLOAD should always be supported). Now we can expand that to
LOAD+SIGN_EXTEND. This is needed to allow vector SIGN_EXTEND and ZERO_EXTEND
to be used for NEON.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111586 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
cbeeae23c31d32b833c9c7c3e8984e4cbcf22f45 11-Jul-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix va_arg for doubles. With this patch VAARG nodes always contain the
correct alignment information, which simplifies ExpandRes_VAARG a bit.

The patch introduces a new alignment information to TargetLoweringInfo. This is
needed since the two natural candidates cannot be used:

* The 's' in target data: If this is set to the minimal alignment of any
argument, getCallFrameTypeAlignment would return 4 for doubles on ARM for
example.
* The getTransientStackAlignment method. It is possible for an architecture to
have argument less aligned than what we maintain the stack pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bcc8017c738e92d9c1af221b11c4916cb524184e 08-Jul-2010 Evan Cheng <evan.cheng@apple.com> Move getExtLoad() and (some) getLoad() DebugLoc argument after EVT argument for consistency sake.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107820 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c66e150b2cb1f2f8e2f4eb124b9177ffc6ef3a74 07-Jul-2010 Jim Grosbach <grosbach@apple.com> By default, the eh.sjlj.setjmp/longjmp intrinsics should just do nothing rather
than assuming a target will custom lower them. Targets which do so should
exlicitly mark them as having custom lowerings. PR7454.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6e9926108a69efbc11f1cadf947e98500e4d4228 02-Jul-2010 Jim Grosbach <grosbach@apple.com> 80-column and trailing whitespace cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107490 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ee7f8b5f058174a55372159bc23088198e5f5991 02-Jul-2010 Jim Grosbach <grosbach@apple.com> grammar tweaks

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
72d13ff755fe8484c89468252f945ba23fe98f71 26-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> When splitting a VAARG, remember its alignment.
This produces terrible but correct code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ef6eb9c7ab7967790566c5e2d47977d89fc060ee 19-Jun-2010 Jim Grosbach <grosbach@apple.com> back-end libcall handling for ATOMIC_SWAP (__sync_lock_test_and_set)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a845706dc1cebfe75913832e07ef114519a879d6 19-Jun-2010 Evan Cheng <evan.cheng@apple.com> Fix cross initialization compilation error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106324 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e03262fcfc09356a0e3ec589041bc2e0248944e9 18-Jun-2010 Jim Grosbach <grosbach@apple.com> Add Expand-to-libcall support for additional atomics. This covers the usual
entries used by llvm-gcc. *_[U]MIN and such can be added later if needed.

This enables the front ends to simplify handling of the atomic intrinsics by
removing the target-specific decision about which targets can handle the
intrinsics.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
027657db7cf60bcbf40403496d7e4a170f9ce1ec 18-Jun-2010 Dan Gohman <gohman@apple.com> Change UpdateNodeOperands' operand and return value from SDValue to
SDNode *, since it doesn't care about the ResNo value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106282 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7720cb3823d5b5868f9b88b0127277820edcb562 18-Jun-2010 Dan Gohman <gohman@apple.com> isValueValidForType can be a static member function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106278 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
59c38f31acf87901208bbf790508196b1c0ad1fd 17-Jun-2010 Jim Grosbach <grosbach@apple.com> add missing break. inconsequential as the code shouldn't be reached, but
for correctness' sake, it should be there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106229 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b56ce8171ec52f44015d95127faaa7dd4ed92763 17-Jun-2010 Jim Grosbach <grosbach@apple.com> Add entries for Expanding atomic intrinsics to libcalls. Just a placeholder
for the moment. The implementation of the libcall will follow.

Currently, the llvm-gcc knows when the intrinsics can be correctly handled by
the back end and only generates them in those cases, issuing libcalls directly
otherwise. That's too much coupling. The intrinsics should always be
generated and the back end decide how to handle them, be it with a libcall,
inline code, or whatever. This patch is a step in that direction.

rdar://8097623



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106227 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bbfc0d22a9a8e197a5ea428f14d37366a1fadd5f 17-Jun-2010 Jim Grosbach <grosbach@apple.com> ISD::MEMBARRIER should lower to a libcall (__sync_synchronize) if the target
sets the legalize action to Expand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106203 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0798eddd07b8dc827a4e6e9028c4c3a8d9444286 28-May-2010 Jim Grosbach <grosbach@apple.com> Update the saved stack pointer in the sjlj function context following either
an alloca() or an llvm.stackrestore(). rdar://8031573



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
14b2141497a913a2d5b508a0174ba09cac61e0bf 19-May-2010 Bob Wilson <bob.wilson@apple.com> When expanding a vector_shuffle, the element type may not be legal and may
need to be promoted. The BUILD_VECTOR and EXTRACT_VECTOR_ELT nodes generated
here already allow the promoted type to be used without further changes, so
just do the promotion. This fixes part of pr7167.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104141 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a5afa1cb214146fd270c86f606b634c8ed6682f2 14-May-2010 Dale Johannesen <dalej@apple.com> Implement a correct ui64->f32 conversion. The old
one was subject to double rounding in extreme cases.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103744 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
038df88e28b88dfea7e95d6331ffcdc03e71d8e4 11-May-2010 Dan Gohman <gohman@apple.com> Trim #includes and forward declarations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
55e59c186303ff02c0be7429da3b1b36c347f164 19-Apr-2010 Dan Gohman <gohman@apple.com> Code that needs a TargetMachine should have access to one directly, rather
than just getting one through a TargetLowering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d858e90f039f5fcdc2fa93035e911a5a9505cc50 17-Apr-2010 Dan Gohman <gohman@apple.com> Use const qualifiers with TargetLowering. This eliminates several
const_casts, and it reinforces the design of the Target classes being
immutable.

SelectionDAGISel::IsLegalToFold is now a static member function, because
PIC16 uses it in an unconventional way. There is more room for API
cleanup here.

And PIC16's AsmPrinter no longer uses TargetLowering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
adf979900c84d00e1fe0872a68d2819c654b6f29 15-Apr-2010 Evan Cheng <evan.cheng@apple.com> More 80 violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
35a389344d21178ee280c2410401b2060b5b879c 08-Apr-2010 Chris Lattner <sabre@nondot.org> use assertions instead of unreachable for logic errors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
75361b69f3f327842b9dad69fa7f28ae3b688412 08-Apr-2010 Chris Lattner <sabre@nondot.org> rename llvm::llvm_report_error -> llvm::report_fatal_error



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ea761868b5e4c0166721daf259f86c3816b44f42 05-Apr-2010 Chris Lattner <sabre@nondot.org> trim some spurious references to DwarfWriter. SDIsel really doesn't
need it anymore, so don't addRequire it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100400 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f0d500768d1a42e91c6324e6c8677cbe26df6e27 18-Mar-2010 Anton Korobeynikov <asl@math.spbu.ru> Get rid of target-specific nodes for fp16 <-> fp32 conversion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98888 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
927411b7ce0b7852fe4f392d8cd4faaa3881f852 14-Mar-2010 Anton Korobeynikov <asl@math.spbu.ru> Make default expansion for FP16 <-> FP32 nodes into libcalls

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5d54b4112d7b8bcd49a07e398ebff263fac1eb9c 12-Mar-2010 Duncan Sands <baldrick@free.fr> Fix PR6522: implement copysign expansion for x86 long double
(it seems that FreeBSD doesn't have copysignl). Done by
removing a bunch of assumptions from the code. This may also
help with sparc 128 bit floats.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0fa9d1d9011a98212b66daf27f6a8a3d734ae818 06-Mar-2010 Dan Gohman <gohman@apple.com> Reapply r97778 and r97779, enabled only for unsigned i64 to f64
conversions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b6b343d77acb5c290f7093e741fbce484d11cedc 05-Mar-2010 Dan Gohman <gohman@apple.com> Revert r97778 and r97779. They're somehow breaking llvm-gcc builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
808ab341b4572815a74235ef00ccb446d334b957 05-Mar-2010 Dan Gohman <gohman@apple.com> Fix these constants to be more portable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
cfa7ca19974a463b47f16a61bfecf7f532dca07d 05-Mar-2010 Dan Gohman <gohman@apple.com> Rewrite i64-to-f64 conversion using an algorithm which handles
rounding correctly. This implementation is a generalization of
the x86_64 code in compiler-rt.

This fixes rdar://7683708.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
46ada19645c981a0b7932487d163f7582074a4d9 02-Mar-2010 Bill Wendling <isanbard@gmail.com> Remove dead parameter passing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9949dd612c8100f7ea7e6daaa56e465f106dd0bd 25-Feb-2010 Dan Gohman <gohman@apple.com> Fix ExpandVectorBuildThroughStack for the case where the
operands are themselves vectors. Based on a patch by
Micah Villmow for PR6338.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
aa9d854b334cab2f29ca6d95413a0946b8a38429 25-Feb-2010 Dan Gohman <gohman@apple.com> Revert r97064. Duncan pointed out that bitcasts are defined in
terms of store and load, which means bitcasting between scalar
integer and vector has endian-specific results, which undermines
this whole approach.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c382bc3c0f476bf94303d9892af4e2cee173bfe5 24-Feb-2010 Dan Gohman <gohman@apple.com> Make getTypeSizeInBits work correctly for array types; it should return
the number of value bits, not the number of bits of allocation for in-memory
storage.

Make getTypeStoreSize and getTypeAllocSize work consistently for arrays and
vectors.

Fix several places in CodeGen which compute offsets into in-memory vectors
to use TargetData information.

This fixes PR1784.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97064 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1e559443a17d1b335f697551c6263ba60d5dd827 15-Feb-2010 David Greene <greened@obbligato.org> Add non-temporal flags and remove an assumption of default arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f451cb870efcf9e0302d25ed05f4cac6bb494e42 10-Feb-2010 Dan Gohman <gohman@apple.com> Fix "the the" and similar typos.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
071c62fad0b25ad4131e7f984173a796c1e63f61 26-Jan-2010 Chris Lattner <sabre@nondot.org> Rearrange handling of jump tables. Highlights:
1. MachineJumpTableInfo is now created lazily for a function the first time
it actually makes a jump table instead of for every function.
2. The encoding of jump table entries is now described by the
MachineJumpTableInfo::JTEntryKind enum. This enum is determined by the
TLI::getJumpTableEncoding() hook, instead of by lots of code scattered
throughout the compiler that "knows" that jump table entries are always
32-bits in pic mode (for example).
3. The size and alignment of jump table entries is now calculated based on
their kind, instead of at machinefunction creation time.

Future work includes using the EntryKind in more places in the compiler,
eliminating other logic that "knows" the layout of jump tables in various
situations.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
eb38ebf15c326a5bb45ca9da6329cdf19ad6df95 24-Jan-2010 Mon P Wang <wangmp@apple.com> Improved widening loads by adding support for wider loads if
the alignment allows. Fixed a bug where we didn't use a
vector load/store for PR5626.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94338 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d1996360399ad6dbe75ee185b661b16c83146373 09-Jan-2010 Dan Gohman <gohman@apple.com> Revert an earlier change to SIGN_EXTEND_INREG for vectors. The VTSDNode
really does need to be a vector type, because
TargetLowering::getOperationAction for SIGN_EXTEND_INREG uses that type,
and it needs to be able to distinguish between vectors and scalars.

Also, fix some more issues with legalization of vector casts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93043 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
993aacedfdc3f156f667b4efa280ee79eab3b898 05-Jan-2010 David Greene <greened@obbligato.org> Change errs() to dbgs().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92575 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d831181f89e913bb17233b5c753e1683e56f5e05 28-Dec-2009 Bill Wendling <isanbard@gmail.com> Remove dead variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ec9d8b00470b2ddabef4e1b58b4f60d69995d8ce 23-Dec-2009 Nuno Lopes <nunoplopes@sapo.pt> move a few more symbols to .rodata

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
775db97a50fb56fece6fbd68e1a6f86418e8063a 23-Dec-2009 Bill Wendling <isanbard@gmail.com> Revert r91949 r91942 and r91936.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
122d06de7482dcb39e7dbcbfe302e39cc55627e5 23-Dec-2009 Bill Wendling <isanbard@gmail.com> Finish up node ordering in ExpandNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3dbcb55b40e3916d538fb6e21ba1662dc82c8fa6 23-Dec-2009 Bill Wendling <isanbard@gmail.com> Assign ordering to nodes created in ExpandNode. Only roughly 1/2 of the function
is finished.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91942 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
167bea71a4bd19329a218f5e1bd8facfd90a0cf9 22-Dec-2009 Bill Wendling <isanbard@gmail.com> Assign ordering to SDNodes in PromoteNode. Also fixing a subtle bug where BSWAP
was using "Tmp1" in the first getNode call instead of Node->getOperand(0).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3ea3c2461932d96d3defa0a9aa93ffaf631bb19d 22-Dec-2009 Bill Wendling <isanbard@gmail.com> Add more plumbing. This time in the LowerArguments and "get" functions which
return partial registers. This affected the back-end lowering code some.

Also patch up some places I missed before in the "get" functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91880 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bceddbdc919fc2ca7bc8c3911586ba93367686f0 17-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Introduce EVT::getHalfSizedIntegerVT() for use in ExpandUnalignedStore() in
LegalizeDAG.cpp. Unlike the code it replaces, which simply decrements the simple
type by one, getHalfSizedIntegerVT() searches for the smallest simple integer
type that is at least half the size of the type it is called on. This approach
has the advantage that it will continue working if a new value type (such as
i24) is added to MVT.

Also, in preparation for new value types, remove the assertions that
non-power-of-2 8-bit-mutiple types are Extended when legalizing extload and
truncstore operations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a0474a83bfa75757866c9ce361ddb8462a585882 12-Dec-2009 Dan Gohman <gohman@apple.com> Delete an unnecessary line. The VTSDNode on a SIGN_EXTEND_REG is never
a vector type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91181 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
87862e77bbf90cf1b68c9eea1f3641ad81435e38 11-Dec-2009 Dan Gohman <gohman@apple.com> Implement vector widening, splitting, and scalarizing for SIGN_EXTEND_INREG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91158 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
714efc63d4319b771d89a95aa7a42d400f03d8c9 05-Dec-2009 Dan Gohman <gohman@apple.com> Remove the unused DisableLegalizeTypes option and related code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7896c9f436a4eda5ec15e882a7505ba482a2fcd0 03-Dec-2009 Chris Lattner <sabre@nondot.org> improve portability to avoid conflicting with std::next in c++'0x.
Patch by Howard Hinnant!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90365 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
735afe14eea8049bf69210ce8a3512e391fc643f 24-Nov-2009 Dan Gohman <gohman@apple.com> Remove ISD::DEBUG_LOC and ISD::DBG_LABEL, which are no longer used.
Note that "hasDotLocAndDotFile"-style debug info was already broken;
people wanting this functionality should implement it in the
AsmPrinter/DwarfWriter code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89711 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bef8888a9197655512f156e50b10799da7240252 21-Nov-2009 Devang Patel <dpatel@apple.com> We are not using DBG_STOPPOINT anymore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5b8bce11d60694a651965cf019b9cb5d84ed3b90 21-Nov-2009 Dale Johannesen <dalej@apple.com> When generating a vector the really slow way, via loads
and stores, handle the case where the element size is not
a valid target type correctly (PPC).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89521 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9a645cd9d4c0e7d25e4b8836ed31deb5881c8101 11-Nov-2009 Dale Johannesen <dalej@apple.com> Emit correct code when making a ConstantPool entry for a vector
constant whose component type is not a legal type for the target.
(If the target ConstantPool cannot handle this type either, it has
an opportunity to merge elements. In practice any target with
8-bit bytes must support i8 *as data*). 7320806 (partial).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86751 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8983da729aa1ca99a11a3b98ae6280dfcdbadb39 07-Nov-2009 Anton Korobeynikov <asl@math.spbu.ru> Add 8 bit libcalls and make use of them for msp430

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a1eaa3c52b75d4fe2bcd4f7c52e56c405ee91d3c 28-Oct-2009 Evan Cheng <evan.cheng@apple.com> Add a second ValueType argument to isFPImmLegal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85361 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
eb2f969a4ddfb0bc8fdcb5bce3b52e53abff321d 27-Oct-2009 Evan Cheng <evan.cheng@apple.com> Do away with addLegalFPImmediate. Add a target hook isFPImmLegal which returns true if the fp immediate can be natively codegened by target.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f5a86f45e75ec744c203270ffa03659eb0a220c1 25-Oct-2009 Nick Lewycky <nicholas@mxc.ca> Remove includes of Support/Compiler.h that are no longer needed after the
VISIBILITY_HIDDEN removal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85043 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6726b6d75a8b679068a58cb954ba97cf9d1690ba 25-Oct-2009 Nick Lewycky <nicholas@mxc.ca> Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.
Chris claims we should never have visibility_hidden inside any .cpp file but
that's still not true even after this commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85042 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ff89dcb06fbd103373436e2d0ae85f252fae2254 18-Oct-2009 Evan Cheng <evan.cheng@apple.com> -Revert parts of 84326 and 84411. Distinquishing between fixed and non-fixed
stack slots and giving them different PseudoSourceValue's did not fix the
problem of post-alloc scheduling miscompiling llvm itself.
- Apply Dan's conservative workaround by assuming any non fixed stack slots can
alias other memory locations. This means a load from spill slot #1 cannot
move above a store of spill slot #2.
- Enable post-alloc scheduling for x86 at optimization leverl Default and above.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
20270c909357e5e501cac1f5393430dfacfc57d8 18-Oct-2009 Evan Cheng <evan.cheng@apple.com> Only fixed stack objects and spill slots should be get FixedStack PseudoSourceValue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84411 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6553155172a2e74feff1253837daa608123de54a 17-Oct-2009 Evan Cheng <evan.cheng@apple.com> Revert 84315 for now. Re-thinking the patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bf125583f8bd8196a34921276add7f304b7c1433 17-Oct-2009 Evan Cheng <evan.cheng@apple.com> Rename getFixedStack to getStackObject. The stack objects represented are not
necessarily fixed. Only those will negative frame indices are "fixed."


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84315 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f77fc92b03efe455008474894d217282e2a03cad 17-Oct-2009 Dan Gohman <gohman@apple.com> Delete an obsolete comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3d910835fc5da1ccddefd7cc5978ffe8c903cbf0 01-Oct-2009 Devang Patel <dpatel@apple.com> Use MDNode * directly as an RecordSourceLine() argument.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83182 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e4b275610a7a05b7ee4c0378a906a6330e4c4ab0 29-Aug-2009 Devang Patel <dpatel@apple.com> Reapply 79977.
Use MDNodes to encode debug info in llvm IR.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
62c77d33b18937ea0b246be3631df082cd621126 26-Aug-2009 Anton Korobeynikov <asl@math.spbu.ru> Add extload expansion for f128

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80116 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
824598883513789516a919651f4b35e7a638ec5c 26-Aug-2009 Devang Patel <dpatel@apple.com> Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80073 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2a610c7387664bc557a35ce3bb4c0d4df56e4755 25-Aug-2009 Devang Patel <dpatel@apple.com> Update DebugInfo interface to use metadata, instead of special named llvm.dbg.... global variables, to encode debugging information in llvm IR. This is mostly a mechanical change that tests metadata support very well.

This change speeds up llvm-gcc by more then 6% at "-O0 -g" (measured by compiling InstructionCombining.cpp!)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
45cfe545ec8177262dabc70580ce05feaa1c3880 23-Aug-2009 Chris Lattner <sabre@nondot.org> Change Pass::print to take a raw ostream instead of std::ostream,
update all code that this affects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
24f20e083280d979e8fa1bc88959ae9e8339ee99 22-Aug-2009 Devang Patel <dpatel@apple.com> Record variable debug info at ISel time directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79742 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2c9489d6e96d99f77b6c31919805b5e61954deb2 19-Aug-2009 Dan Gohman <gohman@apple.com> Be tidy and use a break to exit from a switch block rather than
just falling through the end.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
db8dc2b9faf346fbfa04c07f501981250948f5e2 19-Aug-2009 Dan Gohman <gohman@apple.com> Legalize the shift amount operand of SRL_PARTS, SHL_PARTS, and
SRA_PARTS, as is done for SRL, SHL, and SRA.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79380 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bc037cfcdef8e88274d7dd167fb9d8ba545f2229 15-Aug-2009 Benjamin Kramer <benny.kra@googlemail.com> Unbreak build. Evan, please make sure my changes are correct.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79133 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e96507c73111d88743a15db6d6329f4fbdde7dec 15-Aug-2009 Evan Cheng <evan.cheng@apple.com> 80 col violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
72977a45a8ad9d9524c9b49399e89fb9a3a676ed 14-Aug-2009 Anton Korobeynikov <asl@math.spbu.ru> Allow targets to specify their choice of calling conventions per
libcall. Take advantage of this in the ARM backend to rectify broken
choice of CC when hard float is in effect. PIC16 may want to see if
it could be of use in MakePIC16Libcall, which works unchanged.

Patch by Sandeep!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79033 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1d0be15f89cb5056e20e2d24faa8d6afb1573bca 13-Aug-2009 Owen Anderson <resistor@mac.com> Push LLVMContexts through the IntegerType APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
23b9b19b1a5a00faa9fce0788155c7dbfd00bfb1 12-Aug-2009 Owen Anderson <resistor@mac.com> Add contexts to some of the MVT APIs. No functionality change yet, just the infrastructure work needed to get the contexts to where they need to be first.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78759 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
825b72b0571821bf2d378749f69d6c4cfb52d2f9 11-Aug-2009 Owen Anderson <resistor@mac.com> Split EVT into MVT and EVT, the former representing _just_ a primitive type, while
the latter is capable of representing either a primitive or an extended type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e50ed30282bb5b4a9ed952580523f2dda16215ac 11-Aug-2009 Owen Anderson <resistor@mac.com> Rename MVT to EVT, in preparation for splitting SimpleValueType out into its own struct type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
98ca4f2a325f72374a477f9deba7d09e8999c29b 05-Aug-2009 Dan Gohman <gohman@apple.com> Major calling convention code refactoring.

Instead of awkwardly encoding calling-convention information with ISD::CALL,
ISD::FORMAL_ARGUMENTS, ISD::RET, and ISD::ARG_FLAGS nodes, TargetLowering
provides three virtual functions for targets to override:
LowerFormalArguments, LowerCall, and LowerRet, which replace the custom
lowering done on the special nodes. They provide the same information, but
in a more immediately usable format.

This also reworks much of the target-independent tail call logic. The
decision of whether or not to perform a tail call is now cleanly split
between target-independent portions, and the target dependent portion
in IsEligibleForTailCallOptimization.

This also synchronizes all in-tree targets, to help enable future
refactoring and feature work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9e9a0d5fc26878e51a58a8b57900fcbf952c2691 31-Jul-2009 Owen Anderson <resistor@mac.com> Move more code back to 2.5 APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
debcb01b0f0a15f568ca69e8f288fade4bfc7297 30-Jul-2009 Owen Anderson <resistor@mac.com> Move types back to the 2.5 API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6c1e983a1756e914b328644e6cab7b4a39eb7853 29-Jul-2009 Benjamin Kramer <benny.kra@googlemail.com> Remove now unused Context variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77495 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
baf3c404409d5e47b13984a7f95bfbd6d1f2e79e 29-Jul-2009 Owen Anderson <resistor@mac.com> Move ConstantExpr to 2.5 API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
af7ec975870f92245f1f1484ac80a1e2db6a0afa 28-Jul-2009 Owen Anderson <resistor@mac.com> Return ConstantVector to 2.5 API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
eed707b1e6097aac2bb6b3d47271f6300ace7f2e 25-Jul-2009 Owen Anderson <resistor@mac.com> Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
78d12644b905dc54cf6cf984af02a49d30d29744 24-Jul-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Add support for promoting SETCC operations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a64eb92fe305424ebde2e3de2b12160b8bf76047 17-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Make promotion in operation legalization for SETCC work correctly.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a90b3dc2f1f70ab7102ec3f1fc57f199fd56d7cc 15-Jul-2009 Owen Anderson <resistor@mac.com> Move a few more convenience factory functions from Constant to LLVMContext.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75840 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9adc0abad3c3ed40a268ccbcee0c74cb9e1359fe 15-Jul-2009 Owen Anderson <resistor@mac.com> Move EVER MORE stuff over to LLVMContext.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75703 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c23197a26f34f559ea9797de51e187087c039c42 14-Jul-2009 Torok Edwin <edwintorok@gmail.com> llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.
This adds location info for all llvm_unreachable calls (which is a macro now) in
!NDEBUG builds.
In NDEBUG builds location info and the message is off (it only prints
"UREACHABLE executed").


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c8ca3ae27b64fa785f944799a9bc133fac8f90d9 12-Jul-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Implement support for promotion of AND/OR/XOR on integer types.

The blackfin processor has a legal i16 type, but only logic operations on i32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9a4ba45f4cd0496c422f81e104adf6c03ebdd3ba 12-Jul-2009 Jakob Stoklund Olesen <stoklund@2pi.dk> Fix types in PromoteNode handling of CTPOP and friends.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75418 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c25e7581b9b8088910da31702d4ca21c4734c6d7 11-Jul-2009 Torok Edwin <edwintorok@gmail.com> assert(0) -> LLVM_UNREACHABLE.
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75379 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7d696d80409aad20bb5da0fc4eccab941dd371d4 11-Jul-2009 Torok Edwin <edwintorok@gmail.com> Convert more assert(0)+abort() -> LLVM_UNREACHABLE,
and abort()/exit() -> llvm_report_error().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c680ac90032bf455b2bba77de538fccea08eb267 10-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Make EXTRACT_VECTOR_ELT a bit more flexible in terms of the returned
value. Adjust other code to deal with that correctly. Make
DAGTypeLegalizer::PromoteIntRes_EXTRACT_VECTOR_ELT take advantage of
this new flexibility to simplify the code and make it deal with unusual
vectors (like <4 x i1>) correctly. Fixes PR3037.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d1474d09cbe5fdeec8ba0d6c6b52f316f3422532 09-Jul-2009 Owen Anderson <resistor@mac.com> Thread LLVMContext through MVT and related parts of SDISel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6b61cd185eeb90bec93f042535594132ae1f0f41 03-Jul-2009 Tilmann Scheller <tilmann.scheller@googlemail.com> Add NumFixedArgs attribute to CallSDNode which indicates the number of fixed arguments in a vararg call.

With the SVR4 ABI on PowerPC, vector arguments for vararg calls are passed differently depending on whether they are a fixed or a variable argument. Variable vector arguments always go into memory, fixed vector arguments are put
into vector registers. If there are no free vector registers available, fixed vector arguments are put on the stack.

The NumFixedArgs attribute allows to decide for an argument in a vararg call whether it belongs to the fixed or variable portion of the parameter list.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74764 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f2e19d5dcfa13472493bb18339555686182b7df9 24-Jun-2009 David Greene <greened@obbligato.org> This increases the maximum for MVT::LAST_VALUETYPE

This change doubles the allowable value for MVT::LAST_VALUETYPE. It does
this by doing several things.

1. Introduces MVT::MAX_ALLOWED_LAST_VALUETYPE which in this change has a
value of 64. This value contains the current maximum for the
MVT::LAST_VALUETYPE.

2. Instead of checking "MVT::LAST_VALUETYPE <= 32", all of those uses
now become "MVT::LAST_VALUETYPE <= MVT::MAX_ALLOWED_LAST_VALUETYPE"

3. Changes the dimension of the ValueTypeActions from 2 elements to four
elements and adds comments ahead of the declaration indicating the it is
"(MVT::MAX_ALLOWED_LAST_VALUETYPE/32) * 2". This at least lets us find
what is affected if and when MVT::MAX_ALLOWED_LAST_VALUETYPE gets
changed.

4. Adds initializers for the new elements of ValueTypeActions.

This does NOT add any types in MVT. That would be done separately.

This doubles the size of ValueTypeActions from 64 bits to 128 bits and
gives us the freedom to add more types for AVX.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74110 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
db3c169f3a3102d40352ba63fd14a75c819c7adc 16-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add some generic expansion logic for SMULO and UMULO. Fixes UMULO
support for x86, and UMULO/SMULO for many architectures, including PPC
(PR4201), ARM, and Cell. The resulting expansion isn't perfect, but it's
not bad.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73477 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7a5e55509b99d579d56d126a7b503ec6fe153a8f 07-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Slightly generalize the code that handles shuffles of consecutive loads
on x86 to handle more cases. Fix a bug in said code that would cause it
to read past the end of an object. Rewrite the code in
SelectionDAGLegalize::ExpandBUILD_VECTOR to be a bit more general.
Remove PerformBuildVectorCombine, which is no longer necessary with
these changes. In addition to simplifying the code, with this change,
we can now catch a few more cases of consecutive loads.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5257106c4d396b5d932f7b282c3ba255c4605195 06-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Fix the expansion for CONCAT_VECTORS so that it doesn't create illegal
types.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72993 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7ef3d178660b82d1571757e49f44b004d772a116 06-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Factor out a couple of helpers.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bbdd903c52897df78750aa0caf2fc34d55b5ead0 28-May-2009 Eli Friedman <eli.friedman@gmail.com> Re-commit r72514 and r72516 with a fixed version of BR_CC lowering.
This patch removes some special cases for opcodes and does a bit of
cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
43b41273f3e56f49449992436cc39b406c9a6350 28-May-2009 Bill Wendling <isanbard@gmail.com> Temporarily revert r72514 (and dependent patch r72516). It was causing this
failure during llvm-gcc bootstrap:

Assertion failed: (!Tmp2.getNode() && "Can't legalize BR_CC with legal condition!"), function ExpandNode, file /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore.roots/llvmCore~obj/src/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp, line 2923.
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c:1727: internal compiler error: Abort trap
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72530 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e727d7a08406265acb10d0c52943ef92859710f2 28-May-2009 Eli Friedman <eli.friedman@gmail.com> Remove a couple of useless functions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1c39965342453ce33a3b3f9a863c38fdb45fd6ef 28-May-2009 Eli Friedman <eli.friedman@gmail.com> Remove special cases for more opcodes.

This is basically the end of this series of patches for LegalizeDAG; the
remaining special cases can't be removed without more infrastructure
work. There's a FIXME for each relevant opcode near the beginning of
SelectionDAGLegalize::LegalizeOp.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ad75460e30aab135057355fa0712141bf2cb08fc 28-May-2009 Eli Friedman <eli.friedman@gmail.com> Remove special case for SETCC opcode; add some comments explaining why
some special cases are necessary.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72511 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3be2e514c9e7b20135be5b9df3e9aa1cb08cb374 28-May-2009 Eli Friedman <eli.friedman@gmail.com> Some minor cleanups.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b5da3f6f98b28afc0c62572c164ffccb4004827f 27-May-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanups; add a better explanation for the issue with
BUILD_VECTOR.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4bc8c718218159fe410462f6e3670e7cb76c0c04 27-May-2009 Eli Friedman <eli.friedman@gmail.com> Remove more special cases for opcodes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
509150f973ae650a57b79010a3ec36e60e40f41d 27-May-2009 Eli Friedman <eli.friedman@gmail.com> Remove special cases for more opcodes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f6f20a7779c5308ccb3e4306552d749091a77a60 27-May-2009 Eli Friedman <eli.friedman@gmail.com> Removing more special cases from LegalizeDAG.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
26ea8f982fb58245d3735b80ce04bc8050348a19 27-May-2009 Eli Friedman <eli.friedman@gmail.com> Eliminate more special cases for opcodes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f6b23bfc79cf9f605a2e74942c90799ff4f1a17e 27-May-2009 Eli Friedman <eli.friedman@gmail.com> Remove more special cases from LegalizeDAG.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72456 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
47b41f7e20b6af7aaaf0e050200102d55d038b9d 27-May-2009 Eli Friedman <eli.friedman@gmail.com> Remove unused argument.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72455 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3f727d6c1b68e90a3ab2d95ec2229f8b2c40b84b 27-May-2009 Eli Friedman <eli.friedman@gmail.com> Remove more opcode special cases.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72454 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8c377c7296d8a8104231442c3f6c27296249ec5f 27-May-2009 Eli Friedman <eli.friedman@gmail.com> Start of refactoring LegalizeDAG so that we don't need specialized
handling for every single opcode.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
74807f2520715056be399a2bc59dfc8b6f8f3eb2 26-May-2009 Eli Friedman <eli.friedman@gmail.com> Delete a bunch of dead code from LegalizeDAG.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72414 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
57f1a4bc40e9103cd41cf541b9d6a73b92f0acba 24-May-2009 Eli Friedman <eli.friedman@gmail.com> Minor improvement to FCOPYSIGN to use BIT_CONVERT in cases where the
corresponding integer type is legal.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72373 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ed2f8c557a86612ee14fea25e7be2d3c1445951a 24-May-2009 Eli Friedman <eli.friedman@gmail.com> Rewrite ISD::FCOPYSIGN lowering to never use i64. Not really ideal, but
it's late, and I don't have any better ideas at the moment. Fixes PR4257.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
957bffaeca6a0e2ccc684d753df1d87e8e053fe2 24-May-2009 Eli Friedman <eli.friedman@gmail.com> Remove checks of getTypeAction from LegalizeOp; we already assert that
all results and all operands are legal, so this change shouldn't affect
behavior at all.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1fde9c5f771922f12fefc903850c4eca303297d9 24-May-2009 Eli Friedman <eli.friedman@gmail.com> Disable type legalization in LegalizeDAG.

This leaves around 4000 lines of dead code; I'll clean that up
in subsequent commits.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72358 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2a35b1c54ba55a917e01e0043efcf67e20505953 24-May-2009 Eli Friedman <eli.friedman@gmail.com> Fix a bug in the expansion of EXTRACT_SUBVECTOR in
ExpandExtractFromVectorThroughStack.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3d43b3f6d7e1d3516052f20bf2d14727ebddb8ff 24-May-2009 Eli Friedman <eli.friedman@gmail.com> Add a proper implementation of EXTRACT_SUBVECTOR legalization that
doesn't split legal vector operands. This is necessary because the
type legalization (and therefore, vector splitting) code will be going
away soon.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e3e51c0038bd6ba2add82e2246e97edec0ab2204 21-May-2009 Jay Foad <jay.foad@gmail.com> Use v.data() instead of &v[0] when SmallVector v might be empty.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4e3fdf2c0fc58af9b3b52924708a6d162a52ba5f 11-May-2009 Dan Gohman <gohman@apple.com> When scalarizing a vector BITCAST, check whether the operand has vector
type, rather than assume that it does. If the operand is not vector, it
shouldn't be run through ScalarizeVectorOp. This fixes one of the
testcases in PR3886.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71453 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
777d2306b36816a53bc1ae1244c0dc7d998ae691 09-May-2009 Duncan Sands <baldrick@free.fr> Rename PaddedSize to AllocSize, in the hope that this
will make it more obvious what it represents, and stop
it being confused with the StoreSize.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
58c04e149629956185cdaa3b021793189008c0d2 08-May-2009 Anton Korobeynikov <asl@math.spbu.ru> Properly expand libcalls for urem / srem. Also make code more straightforward.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71238 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a9cad0e7e09e6d34de2fccb4f1294b7f0b8f3b68 06-May-2009 Duncan Sands <baldrick@free.fr> Add generic expansion of SUB when ADD and XOR
are legal. Based on a patch by Micah Villmow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
813090cf891325c715b9f6fb1546e6ce67fa8c8b 03-May-2009 Anton Korobeynikov <asl@math.spbu.ru> Properly handle sdiv / udiv / srem / urem libcalls

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70764 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2f25c2c63fdc46c3b5b093b5cbdc6729f12a413a 03-May-2009 Anton Korobeynikov <asl@math.spbu.ru> Add libcall expansion for 16 and 128 bit muls

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70749 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5ee24e54d76ab86279fe196c03d6e03f5b4b3b3b 01-May-2009 Bob Wilson <bob.wilson@apple.com> Allow CONCAT_VECTORS nodes to be legal or have custom lowering for some targets.
Changes to take advantage of this will come later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a26eae64ddf607549f9e47046d46ea5b9ec648b4 01-May-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make DebugLoc independent of DwarfWriter.

-Replace DebugLocTuple's Source ID with CompileUnit's GlobalVariable*
-Remove DwarfWriter::getOrCreateSourceID
-Make necessary changes for the above (fix callsites, etc.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
98a366d547772010e94609e4584489b3e5ce0043 30-Apr-2009 Bill Wendling <isanbard@gmail.com> Instead of passing in an unsigned value for the optimization level, use an enum,
which better identifies what the optimization is doing. And is more flexible for
future uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ec8eee2d3a402dd001daae3865bc5c10b41c323e 30-Apr-2009 Nate Begeman <natebegeman@mac.com> Fix infinite recursion in the C++ code which handles movddup by making it unnecessary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70425 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5a5ca1519e04310f585197c20e7ae584b7f2d11f 29-Apr-2009 Nate Begeman <natebegeman@mac.com> Implement review feedback for vector shuffle work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
be8cc2a3dedeb7685f07e68cdc4b9502eb97eb2b 29-Apr-2009 Bill Wendling <isanbard@gmail.com> Second attempt:

Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to
use the old behavior, the flag is -O0. This change allows for finer-grained
control over which optimizations are run at different -O levels.

Most of this work was pretty mechanical. The majority of the fixes came from
verifying that a "fast" variable wasn't used anymore. The JIT still uses a
"Fast" flag. I'll change the JIT with a follow-up patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70343 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c69d56f1154342a57c9bdd4c17a10333e3520127 28-Apr-2009 Bill Wendling <isanbard@gmail.com> r70270 isn't ready yet. Back this out. Sorry for the noise.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70275 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2e9d5f912a9841d3685ba0241abe1131943fed29 28-Apr-2009 Bill Wendling <isanbard@gmail.com> Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to
use the old behavior, the flag is -O0. This change allows for finer-grained
control over which optimizations are run at different -O levels.

Most of this work was pretty mechanical. The majority of the fixes came from
verifying that a "fast" variable wasn't used anymore. The JIT still uses a
"Fast" flag. I'm not 100% sure if it's necessary to change it there...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70270 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9771b91c2b4ce3baefdb9ba4ddfd9a9dd5077004 27-Apr-2009 Duncan Sands <baldrick@free.fr> Now that PR2957 is resolved, remove a bunch of
no-longer needed workarounds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9008ca6b6b4f638cfafccb593cbc5b1d3f5ab877 27-Apr-2009 Nate Begeman <natebegeman@mac.com> 2nd attempt, fixing SSE4.1 issues and implementing feedback from duncan.

PR2957

ISD::VECTOR_SHUFFLE now stores an array of integers representing the shuffle
mask internal to the node, rather than taking a BUILD_VECTOR of ConstantSDNodes
as the shuffle mask. A value of -1 represents UNDEF.

In addition to eliminating the creation of illegal BUILD_VECTORS just to
represent shuffle masks, we are better about canonicalizing the shuffle mask,
resulting in substantially better code for some classes of shuffles.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70225 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
15684b29552393553524171bff1913e750f390f8 24-Apr-2009 Rafael Espindola <rafael.espindola@gmail.com> Revert 69952. Causes testsuite failures on linux x86-64.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b706d29f9c5ed3ed9acc82f7ab46205ba56b92dc 24-Apr-2009 Nate Begeman <natebegeman@mac.com> PR2957

ISD::VECTOR_SHUFFLE now stores an array of integers representing the shuffle
mask internal to the node, rather than taking a BUILD_VECTOR of ConstantSDNodes
as the shuffle mask. A value of -1 represents UNDEF.

In addition to eliminating the creation of illegal BUILD_VECTORS just to
represent shuffle masks, we are better about canonicalizing the shuffle mask,
resulting in substantially better code for some classes of shuffles.

A clean up of x86 shuffle code, and some canonicalizing in DAGCombiner is next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b10b5ac8d9da43ca2db61401a20af6b676c98438 18-Apr-2009 Duncan Sands <baldrick@free.fr> Don't try to make BUILD_VECTOR operands have the same
type as the vector element type: allow them to be of
a wider integer type than the element type all the way
through the system, and not just as far as LegalizeDAG.
This should be safe because it used to be this way
(the old type legalizer would produce such nodes), so
backends should be able to handle it. In fact only
targets which have legal vector types with an illegal
promoted element type will ever see this (eg: <4 x i16>
on ppc). This fixes a regression with the new type
legalizer (vec_splat.ll). Also, treat SCALAR_TO_VECTOR
the same as BUILD_VECTOR. After all, it is just a
special case of BUILD_VECTOR.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c23e4968790395053f3f52aeb3342637fcaafdbf 15-Apr-2009 Dan Gohman <gohman@apple.com> Generalize one of the SelectionDAG::ReplaceAllUsesWith overloads
to support replacing a node with another that has a superset of
the result types. Use this instead of calling
ReplaceAllUsesOfValueWith for each value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69209 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b1303d05a89972195de023fda432cc621375a27c 14-Apr-2009 Bob Wilson <bob.wilson@apple.com> Change SelectionDAG type legalization to allow BUILD_VECTOR operands to be
promoted to legal types without changing the type of the vector. This is
following a suggestion from Duncan
(http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-February/019923.html).
The transformation that used to be done during type legalization is now
postponed to DAG legalization. This allows the BUILD_VECTORs to be optimized
and potentially handled specially by target-specific code.

It turns out that this is also consistent with an optimization done by the
DAG combiner: a BUILD_VECTOR and INSERT_VECTOR_ELT may be combined by
replacing one of the BUILD_VECTOR operands with the newly inserted element;
but INSERT_VECTOR_ELT allows its scalar operand to be larger than the
element type, with any extra high bits being implicitly truncated. The
result is a BUILD_VECTOR where one of the operands has a type larger the
the vector element type.

Any code that operates on BUILD_VECTORs may now need to be aware of the
potential type discrepancy between the vector element type and the
BUILD_VECTOR operands. This patch updates all of the places that I could
find to handle that case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
26cbf9eb99c779b8992f4865c6cf308318d39723 13-Apr-2009 Bob Wilson <bob.wilson@apple.com> Refactor some code in SelectionDAGLegalize::ExpandBUILD_VECTOR.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ec15bbfd2f8a3667313dcfa0f9a11497ae6732b8 10-Apr-2009 Bob Wilson <bob.wilson@apple.com> Clean up a bunch of whitespace issues and fix a comment typo.
No functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
fc1665793e62eb4f26d24b8a19eecf59cd872e2a 10-Apr-2009 Dan Gohman <gohman@apple.com> Remove the obsolete SelectionDAG::getNodeValueTypes and simplify
code that uses it by using SelectionDAG::getVTList instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68744 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8f9643f0f768d5dcff0ffea1de6191dba1b5b083 03-Apr-2009 Dan Gohman <gohman@apple.com> Delete ISD::INSERT_SUBREG and ISD::EXTRACT_SUBREG, which are unused.
Note that these are distinct from TargetInstrInfo::INSERT_SUBREG
and TargetInstrInfo::EXTRACT_SUBREG, which are used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5274a4afb720858bf1ab927fc90068f1a8f12eb2 02-Apr-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> To convert the StopPoint insn into an assembler directive by ISel, we need to have access to the line number field. So we convert that info as an operand by custom handling DBG_STOPPOINT in legalize.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68329 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
697cbbfb00c318f98d6eb51945f077e2bfe8781e 20-Mar-2009 Evan Cheng <evan.cheng@apple.com> For inline asm output operand that matches an input. Encode the input operand index in the high bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67387 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1606e8e4cd937e6de6681f686c266cf61722d972 13-Mar-2009 Evan Cheng <evan.cheng@apple.com> Fix some significant problems with constant pools that resulted in unnecessary paddings between constant pool entries, larger than necessary alignments (e.g. 8 byte alignment for .literal4 sections), and potentially other issues.

1. ConstantPoolSDNode alignment field is log2 value of the alignment requirement. This is not consistent with other SDNode variants.
2. MachineConstantPool alignment field is also a log2 value.
3. However, some places are creating ConstantPoolSDNode with alignment value rather than log2 values. This creates entries with artificially large alignments, e.g. 256 for SSE vector values.
4. Constant pool entry offsets are computed when they are created. However, asm printer group them by sections. That means the offsets are no longer valid. However, asm printer uses them to determine size of padding between entries.
5. Asm printer uses expensive data structure multimap to track constant pool entries by sections.
6. Asm printer iterate over SmallPtrSet when it's emitting constant pool entries. This is non-deterministic.


Solutions:
1. ConstantPoolSDNode alignment field is changed to keep non-log2 value.
2. MachineConstantPool alignment field is also changed to keep non-log2 value.
3. Functions that create ConstantPool nodes are passing in non-log2 alignments.
4. MachineConstantPoolEntry no longer keeps an offset field. It's replaced with an alignment field. Offsets are not computed when constant pool entries are created. They are computed on the fly in asm printer and JIT.
5. Asm printer uses cheaper data structure to group constant pool entries.
6. Asm printer compute entry offsets after grouping is done.
7. Change JIT code to compute entry offsets on the fly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0582ae99ba75a556d6ff63b254da327d32ba036f 13-Mar-2009 Bill Wendling <isanbard@gmail.com> Oops...I committed too much.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c7a09ab3110b9462ad9646cb60c22c8527491ad9 13-Mar-2009 Bill Wendling <isanbard@gmail.com> Temporarily XFAIL this test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ccbdc7ab82792ac5d7863ef086f11fb010d88073 09-Mar-2009 Bill Wendling <isanbard@gmail.com> Pass in a std::string when getting the names of debugging things. This cuts down
on the number of times a std::string is created and copied.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d2e936a513b01b2c5df91a9c0d80070e8c752ace 08-Mar-2009 Chris Lattner <sabre@nondot.org> random cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a87008d90b7d894cfca53d407642acfd7be2af3c 25-Feb-2009 Evan Cheng <evan.cheng@apple.com> Revert BuildVectorSDNode related patches: 65426, 65427, and 65296.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e3d423244ae288b2c9021dbb3cd7fb973d1cfc31 25-Feb-2009 Evan Cheng <evan.cheng@apple.com> Clean up dwarf writer, part 1. This eliminated the horrible recursive getGlobalVariablesUsing and replaced it something readable. It eliminated use of slow UniqueVector and replaced it with StringMap, SmallVector, and DenseMap, etc. It also fixed some non-deterministic behavior.

This is a very minor compile time win.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65438 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5aa4977fba97e816b5735f0bc53f16a46b24de63 24-Feb-2009 Bill Wendling <isanbard@gmail.com> - Use the "Fast" flag instead of "OptimizeForSize" to determine whether to emit
a DBG_LABEL or not. We want to fall back to the original way of emitting debug
info when we're in -O0/-fast mode.
- Add plumbing in to pass the "Fast" flag to places that need it.
- XFAIL DebugInfo/deaddebuglabel.ll. This is finding 11 labels instead of 8. I
need to investigate still.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4214a5531cdbe538a358033f1847e55c4436be1b 23-Feb-2009 Scott Michel <scottm@aero.org> Introduce the BuildVectorSDNode class that encapsulates the ISD::BUILD_VECTOR
instruction. The class also consolidates the code for detecting constant
splats that's shared across PowerPC and the CellSPU backends (and might be
useful for other backends.) Also introduces SelectionDAG::getBUID_VECTOR() for
generating new BUILD_VECTOR nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
fdc40a0a696c658d550d894ea03772e5f8af2c94 17-Feb-2009 Scott Michel <scottm@aero.org> Remove trailing whitespace to reduce later commit patch noise.

(Note: Eventually, commits like this will be handled via a pre-commit hook that
does this automagically, as well as expand tabs to spaces and look for 80-col
violations.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
86e6cb924b85e7a288a4d8bfde5d1a8fb9810c88 17-Feb-2009 Bill Wendling <isanbard@gmail.com> --- Merging (from foreign repository) r64714 into '.':
U include/llvm/CodeGen/DebugLoc.h
U lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
U lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp

Enable debug location generation at -Os. This goes with the reapplication of the
r63639 patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64715 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
92c1e126473dfa93eeb4c9a124af4fedb40f0d5b 13-Feb-2009 Bill Wendling <isanbard@gmail.com> Revert this. It was breaking stuff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
54fc7d67146b2b95ae2d1c93ed59008d4338d8c8 13-Feb-2009 Bill Wendling <isanbard@gmail.com> Turn off the old way of handling debug information in the code generator. Use
the new way, where all of the information is passed on SDNodes and machine
instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64427 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6f38cb61a94b3abab70f0ee463bdcf55d86d334e 07-Feb-2009 Dale Johannesen <dalej@apple.com> Use getDebugLoc forwarder instead of getNode()->getDebugLoc.
No functional change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b300d2aa3ef08b5074449e2c05804717f488f4e4 07-Feb-2009 Dale Johannesen <dalej@apple.com> Get rid of the last non-DebugLoc versions of getNode!

Many targets build placeholder nodes for special operands, e.g.
GlobalBaseReg on X86 and PPC for the PIC base. There's no
sensible way to associate debug info with these. I've left
them built with getNode calls with explicit DebugLoc::getUnknownLoc operands.
I'm not too happy about this but don't see a good improvement;
I considered adding a getPseudoOperand or something, but it
seems to me that'll just make it harder to read.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e8d7230f480654cdb8ff1c3d0a38e1e9ab0bd55f 07-Feb-2009 Dale Johannesen <dalej@apple.com> Remove more non-DebugLoc getNode variants. Use
getCALLSEQ_{END,START} to permit passing no DebugLoc
there. UNDEF doesn't logically have DebugLoc; add
getUNDEF to encapsulate this.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63978 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e72c5964d5263f2489bf2c7e9d32f71271d205fc 06-Feb-2009 Dale Johannesen <dalej@apple.com> And one more file.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
33c960f523f2308482d5b2816af46a7ec90a6d3d 04-Feb-2009 Dale Johannesen <dalej@apple.com> Remove non-DebugLoc versions of getLoad and getStore.
Adjust the many callers of those versions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63767 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e5ab34e05d701da042619bf540046efc3c7bc41f 04-Feb-2009 Mon P Wang <wangmp@apple.com> Avoids generating a legalization assert for the case where a vector type is legal
but when legalizing the operation, we split the vector type and generate a library
call whose type needs to be promoted. For example, X86 with SSE on but MMX off,
a divide v2i64 will be scalarized to 2 calls to a library using i64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
39355f9fea790c5a1b12ef0fdcfeac3f533232ea 04-Feb-2009 Dale Johannesen <dalej@apple.com> Remove non-DebugLoc forms of the exotic forms
of Lod and Sto; patch uses.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63716 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c460ae90019ddb19d4c07b2cd2fbaecfa7adf67d 04-Feb-2009 Dale Johannesen <dalej@apple.com> Fill in more omissions in DebugLog propagation.
I think that's it for this directory.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63690 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ff97d4fe81ef0dcee9fe490bed8ab08e40251905 03-Feb-2009 Dale Johannesen <dalej@apple.com> Propagation in TargetLowering. Includes passing a DL
into SimplifySetCC which gets called elsewhere.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ca57b84729303d6f0c5abf951563efcde97010cd 03-Feb-2009 Dale Johannesen <dalej@apple.com> Last DebugLoc propagation for this file.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63574 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c6be110f9127982760f09f17b4910c51962d8d67 02-Feb-2009 Dale Johannesen <dalej@apple.com> More DebugLoc propagation. This should be everything
except LegalizeOp itself.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8a782a2a8c2f0c82f292d03a3f707232b0bae27b 02-Feb-2009 Dale Johannesen <dalej@apple.com> DebugLoc propagation. ExpandOp and PromoteOp,
among others.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63555 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bb5da918545efb54857a09c983a5a7f22a7e04d4 02-Feb-2009 Dale Johannesen <dalej@apple.com> More DebugLoc propagation.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63543 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
af435274e56af687b51f33b5bc6f005fe99ad46f 02-Feb-2009 Dale Johannesen <dalej@apple.com> DebugLoc propagation for int<->fp conversions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b0d5cdd52e8448f769cd71aaee6a4b8592dc08b1 01-Feb-2009 Duncan Sands <baldrick@free.fr> Fix PR3453 and probably a bunch of other potential
crashes or wrong code with codegen of large integers:
eliminate the legacy getIntegerVTBitMask and
getIntegerVTSignBit methods, which returned their
value as a uint64_t, so couldn't handle huge types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
92abc62399881ba9c525be80362c134ad836e2d9 31-Jan-2009 Duncan Sands <baldrick@free.fr> Fix PR3401: when using large integers, the type
returned by getShiftAmountTy may be too small
to hold shift values (it is an i8 on x86-32).
Before and during type legalization, use a large
but legal type for shift amounts: getPointerTy;
afterwards use getShiftAmountTy, fixing up any
shift amounts with a big type during operation
legalization. Thanks to Dan for writing the
original patch (which I shamelessly pillaged).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7d2ad624fa749a6d3edac0d94e9c107989c16304 31-Jan-2009 Dale Johannesen <dalej@apple.com> Make LowerCallTo and LowerArguments take a DebugLoc
argument. Adjust all callers and overloaded versions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63444 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7581bfa2757a3149c6d17c0fe592e5c3808aa843 31-Jan-2009 Bill Wendling <isanbard@gmail.com> Get rid of the non-DebugLoc-ified getNOT() method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63442 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
15b3830bcda4f9958abf1c65e6e1c64c5cbb484d 29-Jan-2009 Dan Gohman <gohman@apple.com> Explicitly add PseudoSourceValue information when lowering
BUILD_VECTOR and conversions to stack operations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f560ffae1f1f6591859c7b70636a3eca6c03f083 28-Jan-2009 Dan Gohman <gohman@apple.com> Make isOperationLegal do what its name suggests, and introduce a
new isOperationLegalOrCustom, which does what isOperationLegal
previously did.

Update a bunch of callers to use isOperationLegalOrCustom
instead of isOperationLegal. In some case it wasn't obvious
which behavior is desired; when in doubt I changed then to
isOperationLegalOrCustom as that preserves their previous
behavior.

This is for the second half of PR3376.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f83c81acbe5923ab6e0572f272d203d795e28185 28-Jan-2009 Dan Gohman <gohman@apple.com> Use ValueType::bitsLT to simplify some code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
77f7a5771e01ec5ec5fdbb3af8fcc2ce31e1d4f7 28-Jan-2009 Dan Gohman <gohman@apple.com> Use ZERO_EXTEND instead of ANY_EXTEND when promoting
shift amounts, to avoid implicitly assuming that
target architectures will ignore the high bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63169 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ce9bc12c6f3c3544f7518c0c60203f2f9dff342f 27-Jan-2009 Dan Gohman <gohman@apple.com> Add an assertion to the form of SelectionDAG::getConstant that takes
a uint64_t to verify that the value is in range for the given type,
to help catch accidental overflow. Fix a few places that relied on
getConstant implicitly truncating the value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9b9948507474acd3c5941ad7d33a37cb066803ad 24-Jan-2009 Nate Begeman <natebegeman@mac.com> Fix an indent and a typo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4c2454623841f05c6c665659b34c214950d12d7e 22-Jan-2009 Bob Wilson <bob.wilson@apple.com> Add SelectionDAG::getNOT method to construct bitwise NOT operations,
corresponding to the "not" and "vnot" PatFrags. Use the new method
in some places where it seems appropriate.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d1e8d9c0a5dc821b6b52f7872181edeeec5df7ba 21-Jan-2009 Scott Michel <scottm@aero.org> CellSPU:
- Ensure that (operation) legalization emits proper FDIV libcall when needed.
- Fix various bugs encountered during llvm-spu-gcc build, along with various
cleanups.
- Start supporting double precision comparisons for remaining libgcc2 build.
Discovered interesting DAGCombiner feature, which is currently solved via
custom lowering (64-bit constants are not legal on CellSPU, but DAGCombiner
insists on inserting one anyway.)
- Update README.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62664 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e9530ecae4897fe8157bd4d7616043bd8c0484e2 15-Jan-2009 Dan Gohman <gohman@apple.com> More consts on TargetLowering references.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62262 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0d137d7f35fba98f668098b3badf644efacf0e08 15-Jan-2009 Dan Gohman <gohman@apple.com> Use const with TargetLowering references in a few more places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
83489bb7700c69b7a4a8da59365c42d3f5c8129b 13-Jan-2009 Devang Patel <dpatel@apple.com> Use DebugInfo interface to lower dbg_* intrinsics.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ceb4d1aecb9deffe59b3dcdc9a783ffde8477be9 12-Jan-2009 Duncan Sands <baldrick@free.fr> Rename getABITypeSize to getTypePaddedSize, as
suggested by Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5480c0469e5c0323ffb12f1ead2abd169d6cc0e7 01-Jan-2009 Duncan Sands <baldrick@free.fr> Fix PR3274: when promoting the condition of a BRCOND node,
promote from i1 all the way up to the canonical SetCC type.
In order to discover an appropriate type to use, pass
MVT::Other to getSetCCResultType. In order to be able to
do this, change getSetCCResultType to take a type as an
argument, not a value (this is also more logical).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
845145f8b5f7feb8617bcfcfd3803ef80b17765d 29-Dec-2008 Scott Michel <scottm@aero.org> Teach LeaglizeDAG that i64 mul can be a libcall.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0b1d4a798d1dd2f39521b6b381cd1c1911c9ab52 23-Dec-2008 Dan Gohman <gohman@apple.com> Clean up the atomic opcodes in SelectionDAG.

This removes all the _8, _16, _32, and _64 opcodes and replaces each
group with an unsuffixed opcode. The MemoryVT field of the AtomicSDNode
is now used to carry the size information. In tablegen, the size-specific
opcodes are replaced by size-independent opcodes that utilize the
ability to compose them with predicates.

This shrinks the per-opcode tables and makes the code that handles
atomics much more concise.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61389 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
87c8a8f304d1ee72829086ce2c41a8fa3813ba6a 18-Dec-2008 Mon P Wang <wangmp@apple.com> Added support for vector widening.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61209 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
84aff84cfab7fe9822a60ca378c66079bad6be85 17-Dec-2008 Mon P Wang <wangmp@apple.com> Fix expansion of vsetcc to set the high bit for true instead of 1.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61129 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b6862bbe34be4a832f709596f8dc971ab9895b06 14-Dec-2008 Duncan Sands <baldrick@free.fr> Reapply r60997, this time without forgetting that
target constants are allowed to have an illegal
type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2d8cc315215febb15a8c18c41ef0b165da71c3b8 14-Dec-2008 Bill Wendling <isanbard@gmail.com> Temporarily revert r60997. It was causing this failure:

Running /Users/void/llvm/llvm.src/test/CodeGen/Generic/dg.exp ...
FAIL: /Users/void/llvm/llvm.src/test/CodeGen/Generic/asm-large-immediate.ll
Failed with exit(1) at line 1
while running: llvm-as < /Users/void/llvm/llvm.src/test/CodeGen/Generic/asm-large-immediate.ll | llc | /usr/bin/grep 68719476738
Assertion failed: ((TypesNeedLegalizing || getTypeAction(VT) == Legal) && "Illegal type introduced after type legalization?"), function HandleOp, file /Users/void/llvm/llvm.src/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp, line 493.
0 llc 0x0085392e char const* std::find<char const*, char>(char const*, char const*, char const&) + 98
1 llc 0x00853e63 llvm::sys::PrintStackTraceOnErrorSignal() + 593
2 libSystem.B.dylib 0x96cac09b _sigtramp + 43
3 libSystem.B.dylib 0xffffffff _sigtramp + 1765097359
4 libSystem.B.dylib 0x96d24ec2 raise + 26
5 libSystem.B.dylib 0x96d3447f abort + 73
6 libSystem.B.dylib 0x96d26063 __assert_rtn + 101
7 llc 0x004f9018 llvm::cast_retty<llvm::SubprogramDesc, llvm::DebugInfoDesc*>::ret_type llvm::cast<llvm::Sub
...




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0f546d4565b988f69850f42282e57a850153146d 13-Dec-2008 Duncan Sands <baldrick@free.fr> LegalizeDAG is not supposed to introduce illegal
types into the DAG if they were not already there.
Check this with an assertion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60997 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e1a0b2e0bbf2bd905afc628c96d8892edb304a3e 13-Dec-2008 Mon P Wang <wangmp@apple.com> Added basic support for expanding VSETCC


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
fd6673cf7fd5c0c1e6817e5fcf460a289712ee57 13-Dec-2008 Duncan Sands <baldrick@free.fr> On big-endian machines it is wrong to do a full
width register load followed by a truncating
store for the copy, since the load will not place
the value in the lower bits. Probably partial
loads/stores can never happen here, but fix it
anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60972 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
05e11fab87102a230551327bfc8434ffad7a88d4 12-Dec-2008 Duncan Sands <baldrick@free.fr> When expanding unaligned loads and stores do not make
use of illegal integer types: instead, use a stack slot
and copying via integer registers. The existing code
is still used if the bitconvert is to a legal integer
type.

This fires on the PPC testcases 2007-09-08-unaligned.ll
and vec_misaligned.ll. It looks like equivalent code
is generated with these changes, just permuted, but
it's hard to tell.

With these changes, nothing in LegalizeDAG produces
illegal integer types anymore. This is a prerequisite
for removing the LegalizeDAG type legalization code.

While there I noticed that the existing code doesn't
handle trunc store of f64 to f32: it turns this into
an i64 store, which represents a 4 byte stack smash.
I added a FIXME about this. Hopefully someone more
motivated than I am will take care of it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
637ed03173fdd154b1736e09358ba608036952b7 12-Dec-2008 Evan Cheng <evan.cheng@apple.com> Fix add/sub expansion: don't create ADD / SUB with two results (seems like everyone is doing this these days :-). Patch by Daniel M Gessel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
712f7b3f549644190e90210a07988753f53daa0a 12-Dec-2008 Duncan Sands <baldrick@free.fr> When using a 4 byte jump table on a 64 bit machine,
do an extending load of the 4 bytes rather than a
potentially illegal (type) i32 load followed by a
sign extend.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9e5ecb8f8f3b639874b943702a3dd1d0739bb9b9 12-Dec-2008 Mon P Wang <wangmp@apple.com> Added support for SELECT v8i8 v4i16 for X86 (MMX)
Added support for TRUNC v8i16 to v8i8 for X86 (MMX)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f67303d2565590bdf77a0d7d95d75f284f14cdd3 11-Dec-2008 Mon P Wang <wangmp@apple.com> Whitespace clean up (tabs with spaces)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bc5e15eafb3c39a214631087b6827a5691e9b25c 10-Dec-2008 Bill Wendling <isanbard@gmail.com> Whitespace changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
74c376529101acbe141a256d0bf23a44eb454c84 09-Dec-2008 Bill Wendling <isanbard@gmail.com> Add sub/mul overflow intrinsics. This currently doesn't have a
target-independent way of determining overflow on multiplication. It's very
tricky. Patch by Zoltan Varga!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1cd46bbb1c6b1c3cb33bbbd3beb97f0c0373df80 09-Dec-2008 Mon P Wang <wangmp@apple.com> In LegalizeOp, don't change the result type of CONVERT_RNDSAT when promoting
one of its operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60749 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e9f1015d1f184a51aaadfd03be0846bd5e7d08a2 09-Dec-2008 Mon P Wang <wangmp@apple.com> Fix getNode to allow a vector for the shift amount for shifts of vectors.
Fix the shift amount when unrolling a vector shift into scalar shifts.
Fix problem in getShuffleScalarElt where it assumes that the input of
a bit convert must be a vector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60740 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
546d7b5c4a3cebf0d5017d42302b4a8d1c8ef584 02-Dec-2008 Scott Michel <scottm@aero.org> Non-functional change: make custom lowering for truncate stylistically
consistent with the way it's generally done in other places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60439 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b0a5cdd4511d02afacd0cd39223cf6c52a6ef361 02-Dec-2008 Tilmann Scheller <tilmann.scheller@googlemail.com> make it possible to custom lower TRUNCATE (needed for the CellSPU target)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60409 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
fb13f008cb2a6a51d2d590f994051586774734a1 02-Dec-2008 Mon P Wang <wangmp@apple.com> Removed some unnecessary code in widening.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
aaffa05d0a652dd3eae76a941d02d6b0469fa821 01-Dec-2008 Duncan Sands <baldrick@free.fr> There are no longer any places that require a
MERGE_VALUES node with only one operand, so get
rid of special code that only existed to handle
that possibility.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1607f05cb7d77d01ce521a30232faa389dbed4e2 01-Dec-2008 Duncan Sands <baldrick@free.fr> Change the interface to the type legalization method
ReplaceNodeResults: rather than returning a node which
must have the same number of results as the original
node (which means mucking around with MERGE_VALUES,
and which is also easy to get wrong since SelectionDAG
folding may mean you don't get the node you expect),
return the results in a vector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9b0f0b5e1505dcd4ec0da87ea9e29c59d98a8d27 27-Nov-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Removing redundant semicolons. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d3f01aa5a1c0242ea0a6294f13e1d078ce2b0938 26-Nov-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Allow custom lowering of ADDE/ADDC/SUBE/SUBC operations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
740464e6164e503f3c01d2b13a52c0261042abe0 25-Nov-2008 Bill Wendling <isanbard@gmail.com> A simplification for checking whether the signs of the operands and sum differ. Thanks, Duncan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60043 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a6af91ae124d0713cfabcea8c5f508091dd7a556 25-Nov-2008 Bill Wendling <isanbard@gmail.com> Now with the correct type for the 0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7ebfea41755c1f7b45fe5cad005ad2ea701c508e 25-Nov-2008 Bill Wendling <isanbard@gmail.com> Get rid of unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c0062fb7557c9f4eb66b7d8fa7b6b0c765e579b8 25-Nov-2008 Bill Wendling <isanbard@gmail.com> Hacker's Delight says, "Signed integer overflow of addition occurs if and only
if the operands have the same sign and the sum has sign opposite to that of the
operands."


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
41ea7e7eb3a6a269f2bfed0bdc191ea046d18e5e 24-Nov-2008 Bill Wendling <isanbard@gmail.com> - Make lowering of "add with overflow" customizable by back-ends.
- Mark "add with overflow" as having a custom lowering for X86. Give it a null
lowering representation for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
24ac408ce891321d1a5d62beaf3487efce6f2b22 24-Nov-2008 Evan Cheng <evan.cheng@apple.com> Eliminate some unused variable compile time warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
def27392c1b4792f695b4eb681cd024ade4025bf 24-Nov-2008 Bill Wendling <isanbard@gmail.com> Add support for llvm.uadd.with.overflow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8ac0d4b4fb10406278cd600214cd3ee6d76620cd 22-Nov-2008 Bill Wendling <isanbard@gmail.com> - Move conversion of [SU]ADDO from DAG combiner into legalizer.
- Add "promote integer type" stuff to the legalizer for these nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
49292f16517227196e0240190b61baaa8fc4aa62 15-Nov-2008 Mon P Wang <wangmp@apple.com> Add missing widen operations, fixed widening for extracting a subvector,
and when loading/storing a widen vector, make sure that they are loaded
and stored in consecutive order.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
77cdf30742284a173fe818417eb482224cdee8d4 10-Nov-2008 Mon P Wang <wangmp@apple.com> Added CONVERT_RNDSAT (conversion with rounding and saturation) SDNode to
support targets that support these conversions. Users should avoid using
this node as the current targets don't generating code for it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
aeb06d246254e4829a49164a11eacced9a43d9d4 10-Nov-2008 Mon P Wang <wangmp@apple.com> Added support for the following definition of shufflevector
<result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <m x i32> <mask>



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
53e4e4478c69c2c2115db833b54385117c764d14 07-Nov-2008 Dale Johannesen <dalej@apple.com> Make FP tests requiring two compares work on PPC (PR 642).
This is Chris' patch from the PR, modified to realize that
SETUGT/SETULT occur legitimately with integers, plus
two fixes in LegalizeDAG to pass a valid result type into
LegalizeSetCC. The argument of TLI.getSetCCResultType is
ignored on PPC, but I think I'm following usage elsewhere.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e0b436ac41a00bc210163964d3cf393c8b487c9e 06-Nov-2008 Mon P Wang <wangmp@apple.com> Fixed scalarizing an extract subvector and prevent an infinite loop
when simplify a vector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58820 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f007a8b931e229eb325319c97363be8507311e2e 06-Nov-2008 Mon P Wang <wangmp@apple.com> Widening cleanup


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
53997b07451a28582a8bb55716e13fc1bcd5c838 04-Nov-2008 Dale Johannesen <dalej@apple.com> 80 columns



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5c58a3168f006aaacf2e9c6a69dde86b630d783e 03-Nov-2008 Duncan Sands <baldrick@free.fr> Make VAARG work with x86 long double (which is
10 bytes long, but is passed in 12/16 bytes).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2eb13c347f0e76d1e9306225b972a7d050d8a461 30-Oct-2008 Mon P Wang <wangmp@apple.com> Add missing vsetcc expansion for widening


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0c39719bfc7d0b3e61fbd55e1115184a1d5f6ae7 30-Oct-2008 Mon P Wang <wangmp@apple.com> Add initial support for vector widening. Logic is set to widen for X86.
One will only see an effect if legalizetype is not active. Will move
support to LegalizeType soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1c15bf58a3700d40a6a88ac0ce14a2c99f111483 21-Oct-2008 Dale Johannesen <dalej@apple.com> Add an SSE2 algorithm for uint64->f64 conversion.
The same one Apple gcc uses, faster. Also gets the
extreme case in gcc.c-torture/execute/ieee/rbug.c
correct which we weren't before; this is not
sufficient to get the test to pass though, there
is another bug.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e7d238ea239e6ab8a2c60ecd27468f3cfc1bb08b 21-Oct-2008 Dan Gohman <gohman@apple.com> Make the NaN test come second, heuristically assuming
that NaNs are less common.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7f042681764c6f8eae22781d8b4cb4c218a86b76 15-Oct-2008 Evan Cheng <evan.cheng@apple.com> - Add target lowering hooks that specify which setcc conditions are illegal,
i.e. conditions that cannot be checked with a single instruction. For example,
SETONE and SETUEQ on x86.
- Teach legalizer to implement *illegal* setcc as a and / or of a number of
legal setcc nodes. For now, only implement FP conditions. e.g. SETONE is
implemented as SETO & SETNE, SETUEQ is SETUO | SETEQ.
- Move x86 target over.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0329466b6b4927f4e6f5d144891fef06a027fec5 14-Oct-2008 Evan Cheng <evan.cheng@apple.com> Rename LoadX to LoadExt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
efa533957dfdc29be6de3845158ebd5fa7391485 13-Oct-2008 Evan Cheng <evan.cheng@apple.com> FIX PR2794. Make sure SIGN_EXTEND_INREG nodes introduced by LegalizeSetCCOperands are leglized. Patch by Richard Pennington.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e563bbc312f8b11ecfe12b8187176f667df1dff3 12-Oct-2008 Chris Lattner <sabre@nondot.org> Change CALLSEQ_BEGIN and CALLSEQ_END to take TargetConstant's as
parameters instead of raw Constants. This prevents the constants from
being selected by the isel pass, fixing PR2735.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7111b02c734c992b8c97d9918118768026dad79e 09-Oct-2008 Dale Johannesen <dalej@apple.com> Rename APFloat::convertToAPInt to bitcastToAPInt to
make it clearer what the function does. No functional
change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57325 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2163ca11d576059883d1c289e5c4d8163d123270 07-Oct-2008 Andrew Lenharth <andrewl@lenharth.org> Use Dan's supperior check

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ff75d9edbb54380deae77c8767fd7581ca401c1d 07-Oct-2008 Andrew Lenharth <andrewl@lenharth.org> No need for |=

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1ad0c8201b119d4d90a837dd622b61eedf1648ea 07-Oct-2008 Andrew Lenharth <andrewl@lenharth.org> Use ADDC if it is valid at any smaller size. Do it right this time

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5c9cc1392cfdea2281431de987f32545a3491fb6 07-Oct-2008 Andrew Lenharth <andrewl@lenharth.org> Use ADDC if it is valid at any smaller size. fixes test/Codegen/Generic/i128-addsub.ll on x86

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57247 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
40d513960a50664c3c4130a40612a5e3673615ce 07-Oct-2008 Andrew Lenharth <andrewl@lenharth.org> Expand arith on machines without carry flags

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
31d7161206d7502e97a01a51a76445a8d9ac6ea5 04-Oct-2008 Chris Lattner <sabre@nondot.org> wrap some long lines and expand i32 mul's to libcalls, inspired by a
patch by Mikael Lepisto!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57077 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1b54c7fe9b034a6450af8596231ad5368b617725 03-Oct-2008 Dale Johannesen <dalej@apple.com> Pass MemOperand through for 64-bit atomics on 32-bit,
incidentally making the case where the memop is a
pointer deref work. Fix cmp-and-swap regression.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
48c1bc2ace6481d3272ab5c18e1f19352c563be8 02-Oct-2008 Dale Johannesen <dalej@apple.com> Handle some 64-bit atomics on x86-32, some of the time.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56963 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
929d3eb171cd95a7fb353ef71a460d2061be4e6c 01-Oct-2008 Dan Gohman <gohman@apple.com> Fix typos in comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f06c835f769aa1cf67801ed1f6bd366a447c18b1 30-Sep-2008 Dan Gohman <gohman@apple.com> Optimize SelectionDAG's AssignTopologicalOrder even further.

Completely eliminate the TopOrder std::vector. Instead, sort
the AllNodes list in place. This also eliminates the need to
call AllNodes.size(), a linear-time operation, before
performing the sort.

Also, eliminate the Sources temporary std::vector, since it
essentially duplicates the sorted result as it is being
built.

This also changes the direction of the topological sort
from bottom-up to top-down. The AllNodes list starts out in
roughly top-down order, so this reduces the amount of
reordering needed. Top-down is also more convenient for
Legalize, and ISel needed only minor adjustments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
71d1bf55a27017fceef25554e02021a3bc47cdb4 30-Sep-2008 Dale Johannesen <dalej@apple.com> Remove misuse of ReplaceNodeResults for atomics with
valid types. No functional change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
86098bd6a63d2cdf0c9be9ef3151bd2728281fd7 26-Sep-2008 Dale Johannesen <dalej@apple.com> Add "inreg" field to CallSDNode (doesn't increase
its size). Adjust various lowering functions to
pass this info through from CallInst. Use it to
implement sseregparm returns on X86. Remove
X86_ssecall calling convention.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4b052dc63d31e764b85d62c056bffe576d501ed4 25-Sep-2008 Richard Pennington <rich@pennware.com> bug 2812: Segmentation fault on a big emdiam processor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
87a0f10dc7eff8cf5e83a754f75adf9cb3991435 23-Sep-2008 Dan Gohman <gohman@apple.com> Fix the alignment of loads from constant pool entries when the
load address has an offset from the base of the constant pool
entry.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56479 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
50284d81f863a6576582e1a171a22eb0f012ddf3 17-Sep-2008 Dan Gohman <gohman@apple.com> Change SelectionDAG::getConstantPool to always set the alignment of the
ConstantPoolSDNode, using the target's preferred alignment for the
constant type.

In LegalizeDAG, when performing loads from the constant pool, the
ConstantPoolSDNode's alignment is used in the calls to getLoad and
getExtLoad.

This change prevents SelectionDAG::getLoad/getExtLoad from incorrectly
choosing the ABI alignment for constant pool loads when Alignment == 0.
The incorrect alignment is only a performance issue when ABI alignment
does not equal preferred alignment (i.e., on x86 it was generating
MOVUPS instead of MOVAPS for v4f32 constant loads when the default ABI
alignment for 128bit vectors is forced to 1 byte.)

Patch by Paul Redmond!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
056292fd738924f3f7703725d8f630983794b5a5 16-Sep-2008 Bill Wendling <isanbard@gmail.com> Reverting r56249. On further investigation, this functionality isn't needed.

Apologies for the thrashing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9468a9b6beed640eca64274c8dcc5aed3b94450b 16-Sep-2008 Bill Wendling <isanbard@gmail.com> - Change "ExternalSymbolSDNode" to "SymbolSDNode".
- Add linkage to SymbolSDNode (default to external).
- Change ISD::ExternalSymbol to ISD::Symbol.
- Change ISD::TargetExternalSymbol to ISD::TargetSymbol

These changes pave the way to allowing SymbolSDNodes with non-external linkage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4fbd796a1251a27e6590765a0a34876f436a0af9 12-Sep-2008 Dan Gohman <gohman@apple.com> Change ConstantSDNode and ConstantFPSDNode to use ConstantInt* and
ConstantFP* instead of APInt and APFloat directly.

This reduces the amount of time to create ConstantSDNode
and ConstantFPSDNode nodes when ConstantInt* and ConstantFP*
respectively are already available, as is the case in
SelectionDAGBuild.cpp. Also, it reduces the amount of time
to legalize constants into constant pools, and the amount of
time to add ConstantFP operands to MachineInstrs, due to
eliminating ConstantInt::get and ConstantFP::get calls.

It increases the amount of work needed to create new constants
in cases where the client doesn't already have a ConstantInt*
or ConstantFP*, such as legalize expanding 64-bit integer constants
to 32-bit constants. And it adds a layer of indirection for the
accessor methods. But these appear to be outweight by the benefits
in most cases.

It will also make it easier to make ConstantSDNode and
ConstantFPNode more consistent with ConstantInt and ConstantFP.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f5aeb1a8e4cf272c7348376d185ef8d8267653e0 12-Sep-2008 Dan Gohman <gohman@apple.com> Rename ConstantSDNode::getValue to getZExtValue, for consistency
with ConstantInt. This led to fixing a bug in TargetLowering.cpp
using getValue instead of getAPIntValue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e2f2083f9ca6f9a9a9d7dbb75d59a779a0452f4a 12-Sep-2008 Dale Johannesen <dalej@apple.com> The sequence for ppcf128 compares was not IEEE
safe in the presence of NaNs.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56136 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9d24ac56e1f9f1025a473d6b013557431fd05b7c 10-Sep-2008 Evan Cheng <evan.cheng@apple.com> A few more places where FPOW is being ignored.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4b88702ac3fac540b970e2d92f3dcc5071f16a84 10-Sep-2008 Evan Cheng <evan.cheng@apple.com> Legalizer was missing code that expand fpow to a libcall.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7794f2a3a7778bdbc9bdd861db1fe914450e0470 04-Sep-2008 Dale Johannesen <dalej@apple.com> Add intrinsics for log, log2, log10, exp, exp2.
No functional change (and no FE change to generate them).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55753 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ba36cb5242eb02b12b277f82b9efe497f7da4d7f 28-Aug-2008 Gabor Greif <ggreif@gmail.com> erect abstraction boundaries for accessing SDValue members, rename Val -> Node to reflect semantics

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e00a8a2a2e11a37fd1ddf2504bd22d225d0994d0 28-Aug-2008 Dale Johannesen <dalej@apple.com> Split the ATOMIC NodeType's to include the size, e.g.
ATOMIC_LOAD_ADD_{8,16,32,64} instead of ATOMIC_LOAD_ADD.
Increased the Hardcoded Constant OpActionsCapacity to match.
Large but boring; no functional change.

This is to support partial-word atomics on ppc; i8 is
not a valid type there, so by the time we get to lowering, the
ATOMIC_LOAD nodes looks the same whether the type was i8 or i32.
The information can be added to the AtomicSDNode, but that is the
largest SDNode; I don't fully understand the SDNode allocation,
but it is sensitive to the largest node size, so increasing
that must be bad. This is the alternative.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55457 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
99a6cb92d173c142073416c81efe6d3daeb80b49 27-Aug-2008 Gabor Greif <ggreif@gmail.com> disallow direct access to SDValue::ResNo, provide a getter instead

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3200d92947cd64f82ca748d65d1e58c3d45f440f 26-Aug-2008 Dan Gohman <gohman@apple.com> Optimize SelectionDAG's topological sort to use one pass instead
of two, and to not need a scratch std::vector. Also, use the
SelectionDAG's topological sort in LegalizeDAG instead of having
a separate implementation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55389 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2bb1e3eede14dd8a965506465e2876fb1ae765c2 21-Aug-2008 Dan Gohman <gohman@apple.com> Add libcalls for the new rounding opcodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55133 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
509e84fa7146175c86dec5ef2167290f294dc89e 21-Aug-2008 Dan Gohman <gohman@apple.com> Add libm-oriented ISD opcodes for rounding operations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7f8613e5b8398b688080e3c944ab8c11593e1ed0 14-Aug-2008 Dan Gohman <gohman@apple.com> Improve support for vector casts in LLVM IR and CodeGen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
24dc346a16397bf740d8d961cd1ebec8d2f46957 29-Jul-2008 Nate Begeman <natebegeman@mac.com> Fix broken CellSPU lowering, re-instate braces in Legalize


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54168 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f09d131126cd60552f09d4fb1c078c085139dcf2 29-Jul-2008 Nate Begeman <natebegeman@mac.com> Disable a fix in the previous patch, since it breaks CellSPU.
The CellSPU codegen is broken, but needs to be fixed before we can
put this back in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5bc1ea0736a5785ed596d58beeff2ab23909e33d 29-Jul-2008 Nate Begeman <natebegeman@mac.com> Add vector shifts to the IR, patch by Eli Friedman.
CodeGen & Clang work coming next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
475871a144eb604ddaf37503397ba0941442e5fb 27-Jul-2008 Dan Gohman <gohman@apple.com> Rename SDOperand to SDValue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8968450305c28444edc3c272d8752a8db0c2f34a 27-Jul-2008 Dan Gohman <gohman@apple.com> Tidy SDNode::use_iterator, and complete the transition to have it
parallel its analogue, Value::value_use_iterator. The operator* method
now returns the user, rather than the use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
92879f3a9e6625d4a17a3d93e6250a59b0497660 25-Jul-2008 Mon P Wang <wangmp@apple.com> When splitting a vector shuffle, fixed which type we used for the hi part


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54007 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
462dc7f4960e5074ddf4769ec8b2ef1ba7a4d2c8 21-Jul-2008 Dan Gohman <gohman@apple.com> Add titles to the various SelectionDAG viewGraph calls
that include useful information like the name of the
block being viewed and the current phase of compilation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d038e04188047eca4749d025ef1f05f7ae660bca 21-Jul-2008 Duncan Sands <baldrick@free.fr> Add VerifyNode, a place to put sanity checks on
generic SDNode's (nodes with their own constructors
should do sanity checking in the constructor). Add
sanity checks for BUILD_VECTOR and fix all the places
that were producing bogus BUILD_VECTORs, as found by
"make check". My favorite is the BUILD_VECTOR with
only two operands that was being used to build a
vector with four elements!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53850 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b2ff885aaed8f9b033b16ca78d645650efc32433 17-Jul-2008 Duncan Sands <baldrick@free.fr> Factorize some code for determining which libcall to use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2920d2b7b601d9dfcec783cb91316f35b6811be1 15-Jul-2008 Mon P Wang <wangmp@apple.com> Fixed potential bug if the source and target of a bit convert have different alignment


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a54cf176613f9ae8301519a61b8935652c0fb8ae 12-Jul-2008 Dan Gohman <gohman@apple.com> Include a frame index in the "fixed stack" pseudo source value
instead of using the frame index for the SVOffset, which was
inconsistent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53486 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c563e1d8fe2e0e9bb47e99ec55c277404969287e 11-Jul-2008 Chris Lattner <sabre@nondot.org> Fix a bug in the soft-float handling of FCOPYSIGN that Duncan noticed
when working on legalizetypes. Both legalizetypes and legalizeops now
produce hte same code for CodeGen/ARM/fcopysign.ll.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53435 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
be1ad4de2900451626c8d4ace07b9ea16099ea1d 10-Jul-2008 Duncan Sands <baldrick@free.fr> Add a mysteriously missing libcall, FPTOSINT_F80_I32.
Be nice to 16 bit machines by supporting FP_TO_XINT
expansion for these.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
71e8685633e7938ee752004cceedccbd0d850527 08-Jul-2008 Evan Cheng <evan.cheng@apple.com> Do not CSE DEBUG_LOC, DBG_LABEL, DBG_STOPPOINT, DECLARE, and EH_LABEL SDNode's. This improves compile time slightly at -O0 -g.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53246 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1002c0203450620594a85454c6a095ca94b87cb2 07-Jul-2008 Dan Gohman <gohman@apple.com> Add explicit keywords.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53179 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6b345ee9b2833cf1b2f79dc16d06d4060bec36ef 07-Jul-2008 Dan Gohman <gohman@apple.com> Make DenseMap's insert return a pair, to more closely resemble std::map.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
21cacc4de88098a6f2ccfcde18ccec0aa6654f3e 07-Jul-2008 Evan Cheng <evan.cheng@apple.com> LegalizeSetCCOperands should legalize the result of ExpandLibCall. Patch by Richard Osborne.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53169 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
364d73ddab43b699ab90240f11b7a2eb5cf69bd8 05-Jul-2008 Mon P Wang <wangmp@apple.com> Fixed generating incorrect aligned stores that I backout of r53031
that fixed problems in EmitStackConvert where the source and target type
have different alignment by creating a stack slot with the max
alignment of source and target type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53150 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
126d90770bdb17e6925b2fe26de99aa079b7b9b3 04-Jul-2008 Duncan Sands <baldrick@free.fr> Rather than having a different custom legalization
hook for each way in which a result type can be
legalized (promotion, expansion, softening etc),
just use one: ReplaceNodeResults, which returns
a node with exactly the same result types as the
node passed to it, but presumably with a bunch of
custom code behind the scenes. No change if the
new LegalizeTypes infrastructure is not turned on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a122f2f51e4cc9edc5f1c4020e51909b585a0f90 03-Jul-2008 Evan Cheng <evan.cheng@apple.com> Backed out 53031.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53110 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4bdcb61af33399d4e01fdf3c47ca1f1f5356e370 02-Jul-2008 Duncan Sands <baldrick@free.fr> Add a new getMergeValues method that does not need
to be passed the list of value types, and use this
where appropriate. Inappropriate places are where
the value type list is already known and may be
long, in which case the existing method is more
efficient.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53035 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bee98c66c0c3d1f43244cdf237e572a9df031e40 02-Jul-2008 Mon P Wang <wangmp@apple.com> Fixed problem in EmitStackConvert where the source and target type
have different alignment by creating a stack slot with the max
alignment of source and target type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6518c6ed7ea609696304bbbe848342cacd001f12 01-Jul-2008 Evan Cheng <evan.cheng@apple.com> Eliminate a compile time warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4406604047423576e36657c7ede266ca42e79642 01-Jul-2008 Dan Gohman <gohman@apple.com> Split ISD::LABEL into ISD::DBG_LABEL and ISD::EH_LABEL, eliminating
the need for a flavor operand, and add a new SDNode subclass,
LabelSDNode, for use with them to eliminate the need for a label id
operand.

Change instruction selection to let these label nodes through
unmodified instead of creating copies of them. Teach the MachineInstr
emitter how to emit a MachineInstr directly from an ISD label node.

This avoids the need for allocating SDNodes for the label id and
flavor value, as well as SDNodes for each of the post-isel label,
label id, and label flavor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7f460203b0c5350e9b2c592f438e40f7a7de6e45 30-Jun-2008 Dan Gohman <gohman@apple.com> Rename ISD::LOCATION to ISD::DBG_STOPPOINT to better reflect its
purpose, and give it a custom SDNode subclass so that it doesn't
need to have line number, column number, filename string, and
directory string, all existing as individual SDNodes to be the
operands.

This was the only user of ISD::STRING, StringSDNode, etc., so
remove those and some associated code.

This makes stop-points considerably easier to read in
-view-legalize-dags output, and reduces overhead (creating new
nodes and copying std::strings into them) on code containing
debugging information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f9516208e57364ab1e7d8748af1f59a2ea5fb572 30-Jun-2008 Duncan Sands <baldrick@free.fr> Revert the SelectionDAG optimization that makes
it impossible to create a MERGE_VALUES node with
only one result: sometimes it is useful to be able
to create a node with only one result out of one of
the results of a node with more than one result, for
example because the new node will eventually be used
to replace a one-result node using ReplaceAllUsesWith,
cf X86TargetLowering::ExpandFP_TO_SINT. On the other
hand, most users of MERGE_VALUES don't need this and
for them the optimization was valuable. So add a new
utility method getMergeValues for creating MERGE_VALUES
nodes which by default performs the optimization.
Change almost everywhere to use getMergeValues (and
tidy some stuff up at the same time).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52893 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
80c1a5622a26794873b0d44e27c04926cd6c6be1 30-Jun-2008 Chris Lattner <sabre@nondot.org> Implement split and scalarize for SELECT_CC, fixing PR2504


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
fd4418fc9b4725c44210c169c4d6500be468ca70 25-Jun-2008 Dan Gohman <gohman@apple.com> Remove the OrigVT member from AtomicSDNode, as it is redundant with
the base SDNode's VTList.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
28873106309db515d58889a4c4fa3e0a92d1b60e 25-Jun-2008 Mon P Wang <wangmp@apple.com> Added MemOperands to Atomic operations since Atomics touches memory.
Added abstract class MemSDNode for any Node that have an associated MemOperand
Changed atomic.lcs => atomic.cmp.swap, atomic.las => atomic.load.add, and
atomic.lss => atomic.load.sub


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52706 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
69bfb15ecd71881ec8d01be94af99b6d90d2fe01 22-Jun-2008 Duncan Sands <baldrick@free.fr> Make custom lowering of ADD work correctly. This
fixes PR2476; patch by Richard Osborne. The same
problem exists for a bunch of other operators, but
I'm ignoring this because they will be automagically
fixed when the new LegalizeTypes infrastructure lands,
since it already solves this problem centrally.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3461cc9e9842c7bce46b9d6e114ff8e44d8ba7b9 20-Jun-2008 Dan Gohman <gohman@apple.com> Clean up some uses of std::distance, now that we have allnodes_size.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c8af52c8980fa4a06f24e6fc08678ff8378088a1 20-Jun-2008 Evan Cheng <evan.cheng@apple.com> ISD::UNDEF should be expanded recursively / iteratively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52508 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
507a58ac9b20ddcea2e56a014be26b8f8cc0ecb8 14-Jun-2008 Andrew Lenharth <andrewl@lenharth.org> add missing atomic intrinsic from gcc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52270 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d4b9c17fb705c2f58ceef4f37d789ddb56783584 13-Jun-2008 Duncan Sands <baldrick@free.fr> Disable some DAG combiner optimizations that may be
wrong for volatile loads and stores. In fact this
is almost all of them! There are three types of
problems: (1) it is wrong to change the width of
a volatile memory access. These may be used to
do memory mapped i/o, in which case a load can have
an effect even if the result is not used. Consider
loading an i32 but only using the lower 8 bits. It
is wrong to change this into a load of an i8, because
you are no longer tickling the other three bytes. It
is also unwise to make a load/store wider. For
example, changing an i16 load into an i32 load is
wrong no matter how aligned things are, since the
fact of loading an additional 2 bytes can have
i/o side-effects. (2) it is wrong to change the
number of volatile load/stores: they may be counted
by the hardware. (3) it is wrong to change a volatile
load/store that requires one memory access into one
that requires several. For example on x86-32, you
can store a double in one processor operation, but to
store an i64 requires two (two i32 stores). In a
multi-threaded program you may want to bitcast an i64
to a double and store as a double because that will
occur atomically, and be indivisible to other threads.
So it would be wrong to convert the store-of-double
into a store of an i64, because this will become two
i32 stores - no longer atomic. My policy here is
to say that the number of processor operations for
an illegal operation is undefined. So it is alright
to change a store of an i64 (requires at least two
stores; but could be validly lowered to memcpy for
example) into a store of double (one processor op).
In short, if the new store is legal and has the same
size then I say that the transform is ok. It would
also be possible to say that transforms are always
ok if before they were illegal, whether after they
are illegal or not, but that's more awkward to do
and I doubt it buys us anything much.
However this exposed an interesting thing - on x86-32
a store of i64 is considered legal! That is because
operations are marked legal by default, regardless of
whether the type is legal or not. In some ways this
is clever: before type legalization this means that
operations on illegal types are considered legal;
after type legalization there are no illegal types
so now operations are only legal if they really are.
But I consider this to be too cunning for mere mortals.
Better to do things explicitly by testing AfterLegalize.
So I have changed things so that operations with illegal
types are considered illegal - indeed they can never
map to a machine operation. However this means that
the DAG combiner is more conservative because before
it was "accidentally" performing transforms where the
type was illegal because the operation was nonetheless
marked legal. So in a few such places I added a check
on AfterLegalize, which I suppose was actually just
forgotten before. This causes the DAG combiner to do
slightly more than it used to, which resulted in the X86
backend blowing up because it got a slightly surprising
node it wasn't expecting, so I tweaked it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8e4eb09b1e3571965f49edcdfb56b1375b1b7551 08-Jun-2008 Duncan Sands <baldrick@free.fr> Remove comparison methods for MVT. The main cause
of apint codegen failure is the DAG combiner doing
the wrong thing because it was comparing MVT's using
< rather than comparing the number of bits. Removing
the < 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
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
83ec4b6711980242ef3c55a4fa36b2d7a39c1bfb 06-Jun-2008 Duncan Sands <baldrick@free.fr> Wrap MVT::ValueType in a struct to get type safety
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
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ba12f57ebea3a5b3d0711d194e4584937309bc8b 03-Jun-2008 Scott Michel <scottm@aero.org> Fix spellnig error

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51917 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8bf61e8c2a39bcf070c39848fea83eda57851ebb 03-Jun-2008 Scott Michel <scottm@aero.org> Add necessary 64-bit support so that gcc frontend compiles (mostly). Current
issue is operand promotion for setcc/select... but looks like the fundamental
stuff is implemented for CellSPU.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
493e03851d630804830b0439f9a714b08638ab95 30-May-2008 Dan Gohman <gohman@apple.com> Remove an unused variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
446efddfcd655131bd0ceeacce9c1166e30ed479 16-May-2008 Evan Cheng <evan.cheng@apple.com> If the result of a BIT_CONVERT is a v1* vector, it doesn't mean its source is a v1* vector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51192 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b434513a20c2df00b8c1cceb4858786fc9baad9e 15-May-2008 Nate Begeman <natebegeman@mac.com> Actually scalarize the operand to BIT_CONVERT instead of asking someone to do
something with a v1 type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9c78a399076f8356a53ee67dca9c78e594e34967 14-May-2008 Dan Gohman <gohman@apple.com> Whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51089 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0d1704b955f9c7ae20e0b3a35b75aaab26e48cfd 13-May-2008 Nate Begeman <natebegeman@mac.com> Teach Legalize how to scalarize VSETCC
Teach X86 a few more vsetcc patterns. Custom lowering for unsupported ones is next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b43e9c196542acc80c9e4643809661065710848f 12-May-2008 Nate Begeman <natebegeman@mac.com> Add support for vicmp/vfcmp codegen, more legalize support coming.
This is necessary to unbreak the build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50988 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9ab9ee8209c313713a54db2d9451751d8cfb9e2a 12-May-2008 Dan Gohman <gohman@apple.com> Fix a missing break in the ISD::FLT_ROUNDS_ handling. Patch by giuma!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
63307c335aa08b0d6a75f81d64d79af7e90eb78b 05-May-2008 Mon P Wang <wangmp@apple.com> Added addition atomic instrinsics and, or, xor, min, and max.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
82747a54849d22c3a0b7c3b56399da9b9e020ee0 30-Apr-2008 Scott Michel <scottm@aero.org> Fix custom target lowering for zero/any/sign_extend: make sure that
DAG.UpdateNodeOperands() is called before (not after) the call to
TLI.LowerOperation().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50461 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6867991d541d08ca95d86841eca5f7c1d5096864 25-Apr-2008 Nate Begeman <natebegeman@mac.com> Pull the code to perform an INSERT_VECTOR_ELT in memory out into its own
function, and then use it to fix a bug in SplitVectorOp that expected inserts
to always have constant insertion indices.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
02a260aa11a2e1b2c14335274d3c42ca3f3eabc0 20-Apr-2008 Chris Lattner <sabre@nondot.org> Switch to using Simplified ConstantFP::get API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
499c1bd358917ad64ed3dcc32492dd38e1a47706 17-Apr-2008 Dan Gohman <gohman@apple.com> Correct the SrcValue information in the Expand code for va_copy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49839 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9cac5259fe237120a0c347d6d14e549005148f1b 16-Apr-2008 Roman Levenstein <romix.llvm@googlemail.com> Ongoing work on improving the instruction selection infrastructure:
Rename SDOperandImpl back to SDOperand.
Introduce the SDUse class that represents a use of the SDNode referred by
an SDOperand. Now it is more similar to Use/Value classes.

Patch is approved by Dan Gohman.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
460a14e09c2af630fc1e840dcb3e0f725663067b 12-Apr-2008 Duncan Sands <baldrick@free.fr> Factor some libcall code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
707e0184233f27e0e9f9aee0309f2daab8cfe7f8 12-Apr-2008 Dan Gohman <gohman@apple.com> Drop ISD::MEMSET, ISD::MEMMOVE, and ISD::MEMCPY, which are not Legal
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
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
dc1adac582fa120861f18ae7221bfe1421fea59f 07-Apr-2008 Roman Levenstein <romix.llvm@googlemail.com> Re-commit of the r48822, where the infinite looping problem discovered
by Dan Gohman is fixed.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6397c64441ddce3822ab0e712f224a11bd75811c 03-Apr-2008 Evan Cheng <evan.cheng@apple.com> Backing out 48222 temporarily.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49124 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9845eb5b033db5ba5213d0b8dba958c1e168ccd3 01-Apr-2008 Evan Cheng <evan.cheng@apple.com> More soft fp fixes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
db45d1c649aa2e7c71accd8ad460aa764886cab3 01-Apr-2008 Evan Cheng <evan.cheng@apple.com> Pasto.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6ad2f930da0ebadb0e000397cea8384c650877bb 01-Apr-2008 Evan Cheng <evan.cheng@apple.com> Add comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
110cf48752dcf86c6d95698c08805f1dd534ac83 01-Apr-2008 Evan Cheng <evan.cheng@apple.com> Unbreak ARM / Thumb soft FP support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e326332acd5fefb9854118603b4d07d4e44b64c5 26-Mar-2008 Roman Levenstein <romix.llvm@googlemail.com> Use a linked data structure for the uses lists of an SDNode, just like
LLVM Value/Use does and MachineRegisterInfo/MachineOperand does.
This allows constant time for all uses list maintenance operations.

The idea was suggested by Chris. Reviewed by Evan and Dan.
Patch is tested and approved by Dan.

On normal use-cases compilation speed is not affected. On very big basic
blocks there are compilation speedups in the range of 15-20% or even better.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48822 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
276dcbdc8db6614cfd5004dc7dc35e437ddf9c58 21-Mar-2008 Duncan Sands <baldrick@free.fr> Introduce a new node for holding call argument
flags. This is needed by the new legalize types
infrastructure which wants to expand the 64 bit
constants previously used to hold the flags on
32 bit machines. There are two functional changes:
(1) in LowerArguments, if a parameter has the zext
attribute set then that is marked in the flags;
before it was being ignored; (2) PPC had some bogus
code for handling two word arguments when using the
ELF 32 ABI, which was hard to convert because of
the bogusness. As suggested by the original author
(Nicolas Geoffray), I've disabled it for the moment.
Tested with "make check" and the Ada ACATS testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
cf49819877addffa29cbb33dc6aab963868e74ee 18-Mar-2008 Dale Johannesen <dalej@apple.com> Make conversions of i8/i16 to ppcf128 work.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5922f561c65968ef1865cc8434d191041e450602 14-Mar-2008 Nate Begeman <natebegeman@mac.com> Tabs -> spaces
Use getIntPtrConstant in a couple places to shorten stuff up
Handle splitting vector shuffles with undefs in the mask


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
002e5d0a170dadd5c307e0b00d8c7970835837e6 13-Mar-2008 Dan Gohman <gohman@apple.com> More APInt-ification.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
034f60ed24c53c1e37f7695965f782faec2dff2b 11-Mar-2008 Dan Gohman <gohman@apple.com> Generalize ExpandIntToFP to handle the case where the operand is legal
and it's the result that requires expansion. This code is a little confusing
because the TargetLoweringInfo tables for [US]INT_TO_FP use the operand type
(the integer type) rather than the result type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6cf9b8adf43b0a460fb4ba8ddbff2787f5aa9d5e 11-Mar-2008 Dan Gohman <gohman@apple.com> More APInt-ification.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a2e9485e34f1348526ed104dbdc194673e291077 11-Mar-2008 Dan Gohman <gohman@apple.com> Implement more support for fp-to-i128 and i128-to-fp conversions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
76c605b18ee74e2c521a02431ab9e1ce6912d827 10-Mar-2008 Dan Gohman <gohman@apple.com> Fix mul expansion to check the correct number of bits for
zero extension when checking if an unsigned multiply is
safe.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5b8f82e35b51bf007de07a7ca9347d804084ddf8 10-Mar-2008 Scott Michel <scottm@aero.org> Give TargetLowering::getSetCCResultType() a parameter so that ISD::SETCC's
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
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f9d95c8835bc4f9072c33e1f9ebaa581a4d3268d 09-Mar-2008 Chris Lattner <sabre@nondot.org> Fix two problems in SelectionDAGLegalize::ExpandBUILD_VECTOR's handling
of BUILD_VECTORS that only have two unique elements:

1. The previous code was nondeterminstic, because it walked a map in
SDOperand order, which isn't determinstic.
2. The previous code didn't handle the case when one element was undef
very well. Now we ensure that the generated shuffle mask has the
undef vector on the RHS (instead of potentially being on the LHS)
and that any elements that refer to it are themselves undef. This
allows us to compile CodeGen/X86/vec_set-9.ll into:

_test3:
movd %rdi, %xmm0
punpcklqdq %xmm0, %xmm0
ret

instead of:

_test3:
movd %rdi, %xmm1
#IMPLICIT_DEF %xmm0
punpcklqdq %xmm1, %xmm0
ret

... saving a register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
27b7db549e4c5bff4579d209304de5628513edeb 08-Mar-2008 Evan Cheng <evan.cheng@apple.com> Implement x86 support for @llvm.prefetch. It corresponds to prefetcht{0|1|2} and prefetchnta instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48042 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0ea0356dff38dfd0420b8c0a2fdf2fae7898c024 05-Mar-2008 Dale Johannesen <dalej@apple.com> Clarify that CALLSEQ_START..END may not be nested,
and add some protection against creating such.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
aa2acbbbf06348f20274f4eeb77f9761c654a589 05-Mar-2008 Chris Lattner <sabre@nondot.org> Improve comment, pass in the original VT so that we can shrink a long double constant
all the way to float, not stopping at double.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47937 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
34bc178e4da0105f3a50a00cc06ca1193c529bcb 05-Mar-2008 Dan Gohman <gohman@apple.com> Codegen support for i128 UINT_TO_FP. This just fixes a
bug in r47928 (Int64Ty is the correct type for the constant
pool entry here) and removes the asserts, now that the code
is capable of handling i128.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6fd599fa6916bd9438dbea7994cf2437bdf4ab8c 05-Mar-2008 Evan Cheng <evan.cheng@apple.com> Add a target lowering hook to control whether it's worthwhile to compress fp constant.
For x86, if sse2 is available, it's not a good idea since cvtss2sd is slower than a movsd load and it prevents load folding. On x87, it's important to shrink fp constant since fldt is very expensive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d19189e9905e14a4001a8ca6fc4effb6a3f88e45 05-Mar-2008 Andrew Lenharth <andrewl@lenharth.org> 64bit CAS on 32bit x86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47929 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d91446de7a89a22c8ea1cbfd40fe2528467a4ccb 05-Mar-2008 Dan Gohman <gohman@apple.com> Codegen support for i128 SINT_TO_FP.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ef12057737229452c17983faa20857dba441ef05 04-Mar-2008 Evan Cheng <evan.cheng@apple.com> Refactor ExpandConstantFP so it can optimize load from constpool of types larger than f64 into extload from smaller types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47883 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
050f550aeb3938d8e202156473fac5eabf0fa703 03-Mar-2008 Dan Gohman <gohman@apple.com> More APInt-ification.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
26ed8697d4733f4ad588ef117ec4387560770ad0 01-Mar-2008 Andrew Lenharth <andrewl@lenharth.org> all but CAS working on x86

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47798 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3c8b59c546b5d56b2cae74da55e26eb994ed36bf 01-Mar-2008 Dale Johannesen <dalej@apple.com> Add MVT::is128BitVector and is64BitVector. Shrink
unaligned load/store code using them. Per review
of unaligned load/store vector patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c7773bf90ee4398ccdeb847db6330cf4507b832b 29-Feb-2008 Dan Gohman <gohman@apple.com> Use the new convertFromAPInt instead of convertFromZeroExtendedInteger,
which allows more of the surrounding arithmetic to be done with APInt
instead of uint64_t.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47745 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
cd9f1747ab72f9863924fbdf43493d9fa6256719 28-Feb-2008 Dale Johannesen <dalej@apple.com> Fix an assertion message.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e07415d4006b923ed1d2057ffa5a493353e28f9e 28-Feb-2008 Chris Lattner <sabre@nondot.org> implement expand for ISD::DECLARE by just deleting it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8155d64c2ffab8b17e0fd8e3b7a66fcef6a8ec9d 27-Feb-2008 Dale Johannesen <dalej@apple.com> Handle load/store of misaligned vectors that are the
same size as an int type by doing a bitconvert of
load/store of the int type (same algorithm as floating point).
This makes them work for ppc Altivec. There was some
code that purported to handle loads of (some) vectors
by splitting them into two smaller vectors, but getExtLoad
rejects subvector loads, so this could never have worked;
the patch removes it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
18714aeaed2a74bfc85dc5abe24a9193882406c5 27-Feb-2008 Dan Gohman <gohman@apple.com> Remove the `else', at Evan's insistence.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47686 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e90a615f37aaee2ad9259c0ef21586d5e4142147 27-Feb-2008 Duncan Sands <baldrick@free.fr> Support for legalizing MEMBARRIER.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1953ecb0a6fc8520b34b52fd04f7476a7eb4613f 27-Feb-2008 Dan Gohman <gohman@apple.com> Teach Legalize how to expand an EXTRACT_ELEMENT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f6283fd27be06021fbe262341be56331bc67786c 25-Feb-2008 Dan Gohman <gohman@apple.com> Make some static variables const.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47566 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2e68b6f52d0979575b2f02ed29717d907ba0684c 25-Feb-2008 Dan Gohman <gohman@apple.com> Convert MaskedValueIsZero and all its users to use APInt. Also add
a SignBitIsZero function to simplify a common use case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9e255b7df5a0a629920706e086e78ef89bf2f183 22-Feb-2008 Dan Gohman <gohman@apple.com> Fix a regression in 403.gcc and 186.crafty introduced in 47383. To test
that a value is >= 32, check that all of the high bits are zero, not
just one or more.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ab0b949e0e9de452f3b052b11634ab761e008b23 21-Feb-2008 Andrew Lenharth <andrewl@lenharth.org> Atomic op support. If any gcc test uses __sync builtins, it might start failing on archs that haven't implemented them yet

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47430 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
91dc17ba4991e971c7e89e07642b10817aa28055 20-Feb-2008 Dan Gohman <gohman@apple.com> Convert Legalize to use the APInt form of ComputeMaskedBits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d497d9fab6e90499c703f3e672ec001dbfa074f9 16-Feb-2008 Andrew Lenharth <andrewl@lenharth.org> I cannot find a libgcc function for this builtin. Therefor expanding it to a noop (which is how it use to be treated). If someone who knows the x86 backend better than me could tell me how to get a lock prefix on an instruction, that would be nice to complete x86 support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
22c5c1b2dfcb1da6a7ebfebea903401fc77d56e6 16-Feb-2008 Andrew Lenharth <andrewl@lenharth.org> llvm.memory.barrier, and impl for x86 and alpha

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47204 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0123b7dcfa9be97588926407163deb8d603487ce 16-Feb-2008 Scott Michel <scottm@aero.org> Make tblgen a little smarter about constants smaller than i32. Currently,
tblgen will complain if a sign-extended constant does not fit into a
data type smaller than i32, e.g., i16. This causes a problem when certain
hex constants are used, such as 0xff for byte masks or immediate xor
values.

tblgen will try the sign-extended value first and, if the sign extended
value would overflow, it tries to see if the unsigned value will fit.
Consequently, a software developer can now safely incant:

(XORHIr16 R16C:$rA, 0xffff)

which is somewhat clearer and more informative than incanting:

(XORHIr16 R16C:$rA, (i16 -1))

even if the two are bitwise equivalent.

Tblgen also outputs the 64-bit unsigned constant in the generated ISel code
when getTargetConstant() is invoked.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
21be3849aef47e6d8c26f31b11def57d59167863 15-Feb-2008 Dan Gohman <gohman@apple.com> Use StoreSDNode::getValue instead of calling getOperand directly
with a hard-coded operand number.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
00fee65fd21f9615d1a604b8b7d42cd16a3f6b47 14-Feb-2008 Duncan Sands <baldrick@free.fr> In TargetLowering::LowerCallTo, don't assert that
the return value is zero-extended if it isn't
sign-extended. It may also be any-extended.
Also, if a floating point value was returned
in a larger floating point type, pass 1 as the
second operand to FP_ROUND, which tells it
that all the precision is in the original type.
I think this is right but I could be wrong.
Finally, when doing libcalls, set isZExt on
a parameter if it is "unsigned". Currently
isSExt is set when signed, and nothing is
set otherwise. This should be right for all
calls to standard library routines.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e179584f9b740cf3a36bde70f8cab40de59b8081 14-Feb-2008 Nate Begeman <natebegeman@mac.com> Change how FP immediates are handled.
1) ConstantFP is now expand by default
2) ConstantFP is not turned into TargetConstantFP during Legalize
if it is legal.

This allows ConstantFP to be handled like Constant, allowing for
targets that can encode FP immediates as MachineOperands.

As a bonus, fix up Itanium FP constants, which now correctly match,
and match more constants! Hooray.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47121 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0325d90348f33e8aa719cd70e4663e7b108297fd 13-Feb-2008 Nate Begeman <natebegeman@mac.com> Support legalizing insert_vector_elt on targets where the element
type is not legal.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bbbbb9c3dd4160990f856854d16a3beaead1f354 11-Feb-2008 Dan Gohman <gohman@apple.com> From Chris' review: use cast instead of dyn_cast with an assert.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0753fc1850a1ca4d17acca854d830d67737fd623 11-Feb-2008 Duncan Sands <baldrick@free.fr> Add a isBigEndian method to complement isLittleEndian.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46954 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3069b8743769527ce7af6cfb6591a2f0fc2faee4 07-Feb-2008 Dan Gohman <gohman@apple.com> Follow Chris' suggestion; change the PseudoSourceValue accessors
to return pointers instead of references, since this is always what
is needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46857 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
69de1932b350d7cdfc0ed1f4198d6f78c7822a02 06-Feb-2008 Dan Gohman <gohman@apple.com> Re-apply the memory operand changes, with a fix for the static
initializer problem, a minor tweak to the way the
DAGISelEmitter finds load/store nodes, and a renaming of the
new PseudoSourceValue objects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a844bdeab31ef04221e7ef59a8467893584cc14d 02-Feb-2008 Evan Cheng <evan.cheng@apple.com> SDIsel processes llvm.dbg.declare by recording the variable debug information descriptor and its corresponding stack frame index in MachineModuleInfo. This only works if the local variable is "homed" in the stack frame. It does not work for byval parameter, etc.
Added ISD::DECLARE node type to represent llvm.dbg.declare intrinsic. Now the intrinsic calls are lowered into a SDNode and lives on through out the codegen passes.
For now, since all the debugging information recording is done at isel time, when a ISD::DECLARE node is selected, it has the side effect of also recording the variable. This is a short term solution that should be fixed in time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46659 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a647c92ec2b3c91e1e6de25cc5c7860912c7626b 01-Feb-2008 Evan Cheng <evan.cheng@apple.com> Rename RecordLabel to RecordSourceLine because that's what it is doing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
334dc1f58d617dcff969a2e107febaae42bbc883 31-Jan-2008 Evan Cheng <evan.cheng@apple.com> Revert 46556 and 46585. Dan please fix the PseudoSourceValue problem and re-commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bb81d97feb396a8bb21d074db1c57e9f66525f40 31-Jan-2008 Evan Cheng <evan.cheng@apple.com> Add an extra operand to LABEL nodes which distinguishes between debug, EH, or misc labels. This fixes the EH breakage. However I am not convinced this is *the* solution.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1a0248690aaa9f7baaf1247e5f65a1c0c9e3783c 31-Jan-2008 Dan Gohman <gohman@apple.com> Rename ISD::FLT_ROUNDS to ISD::FLT_ROUNDS_ to avoid conflicting
with the real FLT_ROUNDS (defined in <float.h>).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c6c391daddbafa722d9ca87d18f204e9a6e617a3 31-Jan-2008 Dan Gohman <gohman@apple.com> Create a new class, MemOperand, for describing memory references
in the backend. Introduce a new SDNode type, MemOperandSDNode, for
holding a MemOperand in the SelectionDAG IR, and add a MemOperand
list to MachineInstr, and code to manage them. Remove the offset
field from SrcValueSDNode; uses of SrcValueSDNode that were using
it are all all using MemOperandSDNode now.

Also, begin updating some getLoad and getStore calls to use the
PseudoSourceValue objects.

Most of this was written by Florian Brander, some
reorganization and updating to TOT by me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b625f2f8960de32bc973092aaee8ac62863006fe 30-Jan-2008 Dan Gohman <gohman@apple.com> Factor the addressing mode and the load/store VT out of LoadSDNode
and StoreSDNode into their common base class LSBaseSDNode. Member
functions getLoadedVT and getStoredVT are replaced with the common
getMemoryVT to simplify code that will handle both loads and stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
55030dc460ff43f382abcc977b3e45bab7d87826 29-Jan-2008 Nate Begeman <natebegeman@mac.com> Properly expand extract-element for non-power-of-2 codegen


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46486 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f9c98e650d2795b8edfae8e1560c221029df218b 23-Jan-2008 Duncan Sands <baldrick@free.fr> The last pieces needed for loading arbitrary
precision integers. This won't actually work
(and most of the code is dead) unless the new
legalization machinery is turned on. While
there, I rationalized the handling of i1, and
removed some bogus (and unused) sextload patterns.
For i1, this could result in microscopically
better code for some architectures (not X86).
It might also result in worse code if annotating
with AssertZExt nodes turns out to be more harmful
than helpful.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46280 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7e857201f387d004571e6058e2ea709163500f38 22-Jan-2008 Duncan Sands <baldrick@free.fr> The final piece needed for storing arbitrary precision
integers. Handle truncstore of a legal type to an unusual
number of bits. Most of this code is not reachable unless
the new legalize infrastructure is turned on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
713ed3f7c0cb788f74af0697fce3c4eafda4178e 20-Jan-2008 Dale Johannesen <dalej@apple.com> Do not generate a FP_ROUND of f64 to f64.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46195 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ddf89566a93081cb230bb9406a72ab2d3eada4a7 17-Jan-2008 Chris Lattner <sabre@nondot.org> This commit changes:

1. Legalize now always promotes truncstore of i1 to i8.
2. Remove patterns and gunk related to truncstore i1 from targets.
3. Rename the StoreXAction stuff to TruncStoreAction in TLI.
4. Make the TLI TruncStoreAction table a 2d table to handle from/to conversions.
5. Mark a wide variety of invalid truncstores as such in various targets, e.g.
X86 currently doesn't support truncstore of any of its integer types.
6. Add legalize support for truncstores with invalid value input types.
7. Add a dag combine transform to turn store(truncate) into truncstore when
safe.

The later allows us to compile CodeGen/X86/storetrunc-fp.ll to:

_foo:
fldt 20(%esp)
fldt 4(%esp)
faddp %st(1)
movl 36(%esp), %eax
fstps (%eax)
ret

instead of:

_foo:
subl $4, %esp
fldt 24(%esp)
fldt 8(%esp)
faddp %st(1)
fstps (%esp)
movl 40(%esp), %eax
movss (%esp), %xmm0
movss %xmm0, (%eax)
addl $4, %esp
ret



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46140 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0bd4893a0726889b942405262e53d06cf3fe3be8 17-Jan-2008 Chris Lattner <sabre@nondot.org> * Introduce a new SelectionDAG::getIntPtrConstant method
and switch various codegen pieces and the X86 backend over
to using it.

* Add some comments to SelectionDAGNodes.h

* Introduce a second argument to FP_ROUND, which indicates
whether the FP_ROUND changes the value of its input. If
not it is safe to xform things like fp_extend(fp_round(x)) -> x.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46125 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a66bb39e9779ce17b7d16e311f4b73fddb2ede2f 16-Jan-2008 Chris Lattner <sabre@nondot.org> merge a few pieces of code that do the store/load to stack
pattern to use EmitStackConvert now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1401d15c99b284ead81b8476a6db95328c5f28fd 16-Jan-2008 Chris Lattner <sabre@nondot.org> rename ExpandBIT_CONVERT to EmitStackConvert, generalizing
it to allow it to emit different load and store kinds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
23594d4537fb88a963c6d6993af5027eac9bfbac 16-Jan-2008 Chris Lattner <sabre@nondot.org> simplify a bunch of code by using SelectionDAG::CreateStackTemporary
instead of inlining its body.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46062 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f2670a89a7c5e29e7f71ab63e06e75dbf482c55b 16-Jan-2008 Chris Lattner <sabre@nondot.org> Change legalizeop of FP_ROUND and FP_EXTEND to not fall through
into the ANY_EXTEND/ZERO_EXTEND/SIGN_EXTEND code to simplify it.

Unmerge the code for FP_ROUND and FP_EXTEND from each other to
make each one simpler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
034f12ea0864a9cca0a74715d6fb06a8bf1dc775 15-Jan-2008 Chris Lattner <sabre@nondot.org> The type of the 'abort' node should be pointer type (because
it's a function pointer) not MVT::Other. This fixes builtin_trap
lowering on ppc, alpha, ia64


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46018 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
41bab0beac2600701af99f63e23a6b65f71468ac 15-Jan-2008 Chris Lattner <sabre@nondot.org> Add support for targets that have a legal ISD::TRAP.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
66fac79b899904ddd82e5ee354a6d370d80230f6 15-Jan-2008 Anton Korobeynikov <asl@math.spbu.ru> For PR1839: add initial support for __builtin_trap. llvm-gcc part is missed
as well as PPC codegen


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
007f9847c44ddbe7fd04cba362b4ec0f0f40964b 10-Jan-2008 Duncan Sands <baldrick@free.fr> Output sinl for a long double FSIN node, not sin.
Likewise fix up a bunch of other libcalls. While
there I remove NEG_F32 and NEG_F64 since they are
not used anywhere. This fixes 9 Ada ACATS failures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2281a991414f681c482157265461b29a923ef620 05-Jan-2008 Nate Begeman <natebegeman@mac.com> If custom lowering of insert element fails, the result Val will be 0.
Don't overwrite a variable used by the fallthrough code path in this
case.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45630 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b027fa001f16660a231a54ecea6a79f5c7855d7c 31-Dec-2007 Duncan Sands <baldrick@free.fr> Fix PR1833 - eh.exception and eh.selector return two
values, which means doing extra legalization work.
It would be easier to get this kind of thing right if
there was some documentation...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
84bc5427d6883f73cfeae3da640acd011d35c006 31-Dec-2007 Chris Lattner <sabre@nondot.org> Rename SSARegMap -> MachineRegisterInfo in keeping with the idea
that "machine" classes are used to represent the current state of
the code being compiled. Given this expanded name, we can start
moving other stuff into it. For now, move the UsedPhysRegs and
LiveIn/LoveOuts vectors from MachineFunction into it.

Update all the clients to match.

This also reduces some needless #includes, such as MachineModuleInfo
from MachineFunction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4ee451de366474b9c228b4e5fa573795a715216d 29-Dec-2007 Chris Lattner <sabre@nondot.org> Remove attribution from file headers, per discussion on llvmdev.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c58d558a79c3638c23d8fd09d89accff33285653 24-Nov-2007 Chris Lattner <sabre@nondot.org> Implement expand support for MERGE_VALUEs that only produces one result.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
27a6c7380fa4dfc8e1837a8dd67967d063b26544 24-Nov-2007 Chris Lattner <sabre@nondot.org> Several changes:
1) Change the interface to TargetLowering::ExpandOperationResult to
take and return entire NODES that need a result expanded, not just
the value. This allows us to handle things like READCYCLECOUNTER,
which returns two values.
2) Implement (extremely limited) support in LegalizeDAG::ExpandOp for MERGE_VALUES.
3) Reimplement custom lowering in LegalizeDAGTypes in terms of the new
ExpandOperationResult. This makes the result simpler and fully
general.
4) Implement (fully general) expand support for MERGE_VALUES in LegalizeDAGTypes.
5) Implement ExpandOperationResult support for ARM f64->i64 bitconvert and ARM
i64 shifts, allowing them to work with LegalizeDAGTypes.
6) Implement ExpandOperationResult support for X86 READCYCLECOUNTER and FP_TO_SINT,
allowing them to work with LegalizeDAGTypes.

LegalizeDAGTypes now passes several more X86 codegen tests when enabled and when
type legalization in LegalizeDAG is ifdef'd out.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e400af83b3f8b69407a8963f1d2e2c82fa766f33 19-Nov-2007 Chris Lattner <sabre@nondot.org> ExpandUnalignedLoad doesn't handle vectors right at all apparently.
Fix a couple of problems:
1. Don't assume the VT-1 is a VT that is half the size.
2. Treat vectors of FP in the vector path, not the FP path.

This has a couple of remaining problems before it will work with
the code in PR1811: the code below this change assumes that it can
use extload/shift/or to construct the result, which isn't right for
vectors.

This also doesn't handle vectors of 1 or vectors that aren't pow-2.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6c9c6800b844771117943c400d0a9a47460a46b9 19-Nov-2007 Chris Lattner <sabre@nondot.org> Implement vector expand support for shuffle_vector. This fixes PR1811.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
daf9bc8eee3eb1bc992480921f50ef1b760f4159 19-Nov-2007 Chris Lattner <sabre@nondot.org> Implement splitting of UNDEF nodes. This is the first step towards fixing PR1811


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
089617d9e3acc242151a007e7a051ed2fb200b1f 19-Nov-2007 Dan Gohman <gohman@apple.com> Add support in SplitVectorOp for remainder operators.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44233 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b348d18caf834bc26a80e60aa7a2c9b1748734e8 17-Nov-2007 Nate Begeman <natebegeman@mac.com> Add support for vectors to int <-> float casts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44204 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
917c2a6ff2cfcd1263a5dd80c54336754c553ace 16-Nov-2007 Anton Korobeynikov <asl@math.spbu.ru> Implement necessary bits for flt_rounds gcc builtin.
Codegen bits and llvm-gcc support will follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44182 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5db1afb462b048bc10e0003db5a770ed960b2ddf 15-Nov-2007 Nate Begeman <natebegeman@mac.com> Basic non-power-of-2 vector support


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44181 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0f8d9c04d9feef86cee35cf5fecfb348a6b3de50 13-Nov-2007 Bill Wendling <isanbard@gmail.com> Unify CALLSEQ_{START,END}. They take 4 parameters: the chain, two stack
adjustment fields, and an optional flag. If there is a "dynamic_stackalloc" in
the code, make sure that it's bracketed by CALLSEQ_START and CALLSEQ_END. If
not, then there is the potential for the stack to be changed while the stack's
being used by another instruction (like a call).

This can only result in tears...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
fd617d0143a158bc1c996445262d409280e7b0cc 09-Nov-2007 Duncan Sands <baldrick@free.fr> Move MinAlign to MathExtras.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
cc41586b9d79532172b37e1f44a9077da4b73fc9 09-Nov-2007 Evan Cheng <evan.cheng@apple.com> Much improved pic jumptable codegen:

Then:
call "L1$pb"
"L1$pb":
popl %eax
...
LBB1_1: # entry
imull $4, %ecx, %ecx
leal LJTI1_0-"L1$pb"(%eax), %edx
addl LJTI1_0-"L1$pb"(%ecx,%eax), %edx
jmpl *%edx

.align 2
.set L1_0_set_3,LBB1_3-LJTI1_0
.set L1_0_set_2,LBB1_2-LJTI1_0
.set L1_0_set_5,LBB1_5-LJTI1_0
.set L1_0_set_4,LBB1_4-LJTI1_0
LJTI1_0:
.long L1_0_set_3
.long L1_0_set_2

Now:
call "L1$pb"
"L1$pb":
popl %eax
...
LBB1_1: # entry
addl LJTI1_0-"L1$pb"(%eax,%ecx,4), %eax
jmpl *%eax

.align 2
.set L1_0_set_3,LBB1_3-"L1$pb"
.set L1_0_set_2,LBB1_2-"L1$pb"
.set L1_0_set_5,LBB1_5-"L1$pb"
.set L1_0_set_4,LBB1_4-"L1$pb"
LJTI1_0:
.long L1_0_set_3
.long L1_0_set_2


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2dfdefd282a04785c4d7b43e37782ace65af2ba6 09-Nov-2007 Evan Cheng <evan.cheng@apple.com> Didn't mean to check these in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43923 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7da8f399bf09e9a03fe8bdd8c8eef6e5a7d87327 09-Nov-2007 Evan Cheng <evan.cheng@apple.com> Bug fix. Passive nodes are not in SUnitMap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0d97426b7b3d57cc3ff651a400b758733f2058a8 06-Nov-2007 Dan Gohman <gohman@apple.com> Remainder operations must be either integer or floating-point.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
80176319f3ea5d3d943aa540e76381e8567f5dcb 06-Nov-2007 Dan Gohman <gohman@apple.com> Add support for vector remainder operations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43744 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
514ab348fddcdffa8367685dc608b2f8d5de986d 01-Nov-2007 Duncan Sands <baldrick@free.fr> Executive summary: getTypeSize -> getTypeStoreSize / getABITypeSize.
The meaning of getTypeSize was not clear - clarifying it is important
now that we have x86 long double and arbitrary precision integers.
The issue with long double is that it requires 80 bits, and this is
not a multiple of its alignment. This gives a primitive type for
which getTypeSize differed from getABITypeSize. For arbitrary precision
integers it is even worse: there is the minimum number of bits needed to
hold the type (eg: 36 for an i36), the maximum number of bits that will
be overwriten when storing the type (40 bits for i36) and the ABI size
(i.e. the storage size rounded up to a multiple of the alignment; 64 bits
for i36).

This patch removes getTypeSize (not really - it is still there but
deprecated to allow for a gradual transition). Instead there is:

(1) getTypeSizeInBits - a number of bits that suffices to hold all
values of the type. For a primitive type, this is the minimum number
of bits. For an i36 this is 36 bits. For x86 long double it is 80.
This corresponds to gcc's TYPE_PRECISION.

(2) getTypeStoreSizeInBits - the maximum number of bits that is
written when storing the type (or read when reading it). For an
i36 this is 40 bits, for an x86 long double it is 80 bits. This
is the size alias analysis is interested in (getTypeStoreSize
returns the number of bytes). There doesn't seem to be anything
corresponding to this in gcc.

(3) getABITypeSizeInBits - this is getTypeStoreSizeInBits rounded
up to a multiple of the alignment. For an i36 this is 64, for an
x86 long double this is 96 or 128 depending on the OS. This is the
spacing between consecutive elements when you form an array out of
this type (getABITypeSize returns the number of bytes). This is
TYPE_SIZE in gcc.

Since successive elements in a SequentialType (arrays, pointers
and vectors) need to be aligned, the spacing between them will be
given by getABITypeSize. This means that the size of an array
is the length times the getABITypeSize. It also means that GEP
computations need to use getABITypeSize when computing offsets.
Furthermore, if an alloca allocates several elements at once then
these too need to be aligned, so the size of the alloca has to be
the number of elements multiplied by getABITypeSize. Logically
speaking this doesn't have to be the case when allocating just
one element, but it is simpler to also use getABITypeSize in this
case. So alloca's and mallocs should use getABITypeSize. Finally,
since gcc's only notion of size is that given by getABITypeSize, if
you want to output assembler etc the same as gcc then getABITypeSize
is the size you want.

Since a store will overwrite no more than getTypeStoreSize bytes,
and a read will read no more than that many bytes, this is the
notion of size appropriate for alias analysis calculations.

In this patch I have corrected all type size uses except some of
those in ScalarReplAggregates, lib/Codegen, lib/Target (the hard
cases). I will get around to auditing these too at some point,
but I could do with some help.

Finally, I made one change which I think wise but others might
consider pointless and suboptimal: in an unpacked struct the
amount of space allocated for a field is now given by the ABI
size rather than getTypeStoreSize. I did this because every
other place that reserves memory for a type (eg: alloca) now
uses getABITypeSize, and I didn't want to make an exception
for unpacked structs, i.e. I did it to make things more uniform.
This only effects structs containing long doubles and arbitrary
precision integers. If someone wants to pack these types more
tightly they can always use a packed struct.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
25f1d08619720b82e7c944b18eee488fc07ba153 31-Oct-2007 Dale Johannesen <dalej@apple.com> Make i64=expand_vector_elt(v2i64) work in 32-bit mode.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
dc84650679b6330e0fcdd4cf8bc2a351387db7ca 28-Oct-2007 Duncan Sands <baldrick@free.fr> The guaranteed alignment of ptr+offset is only the minimum of
of offset and the alignment of ptr if these are both powers of
2. While the ptr alignment is guaranteed to be a power of 2,
there is no reason to think that offset is. For example, if
offset is 12 (the size of a long double on x86-32 linux) and
the alignment of ptr is 8, then the alignment of ptr+offset
will in general be 4, not 8. Introduce a function MinAlign,
lifted from gcc, for computing the minimum guaranteed alignment.
I've tried to fix up everywhere under lib/CodeGen/SelectionDAG/.
I also changed some places that weren't wrong (because both values
were a power of 2), as a defensive change against people copying
and pasting the code.
Hopefully someone who cares about alignment will review the rest
of LLVM and fix up the remaining places. Since I'm on x86 I'm
not very motivated to do this myself...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43421 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8eadd5a6db79da067c773d1bd1cc13edc07788cc 25-Oct-2007 Dale Johannesen <dalej@apple.com> Another expansion for i64 multiply, suitable for PPC.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e526962fc59d38b4b0f671717df7657b8e0d8baa 20-Oct-2007 Dale Johannesen <dalej@apple.com> Fix a few places vector operations were not getting
the operand's type from the right place.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43195 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b6210fc92b643a5440d8373b5f36b6e579b5feb8 19-Oct-2007 Dale Johannesen <dalej@apple.com> Redo "last ppc long double fix" as Chris wants.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f185e67844e6229e2b0fe9080a5f66fb01fb7f5a 19-Oct-2007 Chris Lattner <sabre@nondot.org> Fix a really nasty vector miscompilation bill recently introduced.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43181 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5c0d6ed325417baa5d119af9c2b6790231d8565f 19-Oct-2007 Rafael Espindola <rafael.espindola@gmail.com> Add support for byval function whose argument is not 32 bit aligned.
To do this it is necessary to add a "always inline" argument to the
memcpy node. For completeness I have also added this node to memmove
and memset. I have also added getMem* functions, because the extra
argument makes it cumbersome to use getNode and because I get confused
by it :-)




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43172 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1851898e757008228453aa3f4e3e06bbaecce04d 19-Oct-2007 Bill Wendling <isanbard@gmail.com> Negative indices aren't allowed here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
90bfc2d10520f9621309436c1c6928a59cd33616 18-Oct-2007 Bill Wendling <isanbard@gmail.com> Pointer arithmetic should be done with the index the same size as the pointer.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c623096fe227a7705ccac5a5db514b64ccdfe6b2 17-Oct-2007 Dan Gohman <gohman@apple.com> Add support for ISD::SELECT in SplitVectorOp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f411b83c8c6853c2a922b692e782566353153f08 17-Oct-2007 Duncan Sands <baldrick@free.fr> Return Expand from getOperationAction for all extended
types. This is needed for SIGN_EXTEND_INREG at least.
It is not clear if this is correct for other operations.
On the other hand, for the various load/store actions
it seems to correct to return the type action, as is
currently done.
Also, it seems that SelectionDAG::getValueType can be
called for extended value types; introduce a map for
holding these, since we don't really want to extend
the vector to be 2^32 pointers long!
Generalize DAGTypeLegalizer::PromoteResult_TRUNCATE
and DAGTypeLegalizer::PromoteResult_INT_EXTEND to handle
the various funky possibilities that apints introduce,
for example that you can promote to a type that needs
to be expanded.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a7c97a7f5b82778ca5abfc3791c6b7f96b82a5fa 16-Oct-2007 Duncan Sands <baldrick@free.fr> Fixes due to lack of type-safety for ValueType: (1) ValueType
being passed instead of an opcode; (2) ValueType being passed
for isVolatile (!) in getLoad.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
85dd3be7354f848231362bd70f6517c0e667f95d 15-Oct-2007 Chris Lattner <sabre@nondot.org> Move CreateStackTemporary out to SelectionDAG


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42995 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3cb9351e8a3691ee8cad6960601c6e3d4b293352 15-Oct-2007 Chris Lattner <sabre@nondot.org> One xform performed by LegalizeDAG is transformation of "store of fp" to "store of int".
Make two changes:
1) only xform "store of f32" if i32 is a legal type for the target.
2) only xform "store of f64" if either i64 or i32 are legal for the target.
3) if i64 isn't legal, manually lower to 2 stores of i32 instead of letting a
later pass of legalize do it. This is ugly, but helps future changes I'm
about to commit.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7a3c85583d523edb90aa957a02385254957c6e37 14-Oct-2007 Chris Lattner <sabre@nondot.org> remove misleading comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42970 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
fb5b11046bfc27e4c8388f4b3d7f1adc927f7fe6 14-Oct-2007 Chris Lattner <sabre@nondot.org> If a target doesn't have HasMULHU or HasUMUL_LOHI, ExpandOp would return
without lo/hi set. Fall through to making a libcall instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2b4c279a8e203fa8b13adf7ba3a5d4c8bef70df3 13-Oct-2007 Chris Lattner <sabre@nondot.org> Add a simple optimization to simplify the input to
truncate and truncstore instructions, based on the
knowledge that they don't demand the top bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f646774edd2588f6aa866ceb5e1b921f924a246f 12-Oct-2007 Dale Johannesen <dalej@apple.com> ppc long double. Implement fabs and fneg.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6e63e092365b763b65cc97a4d2c634443046c15a 12-Oct-2007 Dale Johannesen <dalej@apple.com> Implement i64->ppcf128 conversions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9e04c82c0ec7c94d82168c07177ff9d1fea5b9d5 12-Oct-2007 Dan Gohman <gohman@apple.com> Add support to SplitVectorOp for powi, where the second operand
is a scalar integer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ca68aaa0e50c4037c0faa9bfbe7e091087837259 12-Oct-2007 Dale Johannesen <dalej@apple.com> PPC long double. Implement a couple more conversions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42888 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
826695281344e3a4c4d44d73dd155107aafd689b 12-Oct-2007 Dan Gohman <gohman@apple.com> Codegen support for vector intrinsics.

Factor out the code that expands the "nasty scalar code" for unrolling
vectors into a separate routine, teach it how to handle mixed
vector/scalar operands, as seen in powi, and use it for several operators,
including sin, cos, powi, and pow.

Add support in SplitVectorOp for fpow, fpowi and for several unary
operators.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
fcf4d24ffbba0935de3e8371cfd52fc3d6980789 12-Oct-2007 Dale Johannesen <dalej@apple.com> Implement ppc long double->uint conversion.
Make ppc long double constants print.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42882 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a471c2ecda37cd1bae0d94e832f002caa7b63216 11-Oct-2007 Dale Johannesen <dalej@apple.com> Next PPC long double bits. First cut at constants.
No compile-time support for constant operations yet,
just format transformations. Make readers and
writers work. Split constants into 2 doubles in
Legalize.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6eaeff29b8a6990107735f7e5f5e49da38f56223 10-Oct-2007 Dale Johannesen <dalej@apple.com> Next PPC long double bits: ppcf128->i32 conversion.
Surprisingly complicated.
Adds getTargetNode for 2 outputs, no inputs (missing).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42822 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
525178cdbf00720ea8bce297a7d65b0cca0ab439 08-Oct-2007 Dan Gohman <gohman@apple.com> Migrate X86 and ARM from using X86ISD::{,I}DIV and ARMISD::MULHILO{U,S} to
use ISD::{S,U}DIVREM and ISD::{S,U}MUL_HIO. Move the lowering code
associated with these operators into target-independent in LegalizeDAG.cpp
and TargetLowering.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42762 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ccf596a53e16ea221a9bf8b3874a7d6afa71f1f4 07-Oct-2007 Neil Booth <neil@daikokuya.co.uk> convertFromInteger, as originally written, expected sign-extended
input. APInt unfortunately zero-extends signed integers, so Dale
modified the function to expect zero-extended input. Make this
assumption explicit in the function name.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42732 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
638ccd52b9fa2d1d03a1e85992c09e2bf6800fc6 06-Oct-2007 Dale Johannesen <dalej@apple.com> Next powerpc long double bits. Comparisons work,
although not well, and shortening FP converts.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
161e897b0fb35d156b2fe720fadabd975b0d6723 05-Oct-2007 Dale Johannesen <dalej@apple.com> First round of ppc long double. call/return and
basic arithmetic works.
Rename RTLIB long double functions to distinguish
different flavors of long double; the lib functions
have different names, alas.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e14ea867449cffa9a5835bc62c9c557ab0bc6618 05-Oct-2007 Dan Gohman <gohman@apple.com> Legalize support for MUL_LOHI and DIVREM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
daccea18ca8357b4193ac3ba42a168e650b807e0 05-Oct-2007 Evan Cheng <evan.cheng@apple.com> Silence a warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
88216af3ea4bb1c68a8793ed1d3b30308b64ab0e 30-Sep-2007 Dale Johannesen <dalej@apple.com> Constant fold int-to-long-double conversions;
use APFloat for int-to-float/double; use
round-to-nearest for these (implementation-defined,
seems to match gcc).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42484 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9fe4662d9a9e5b346dc053b6a53bc3d096adb77b 29-Sep-2007 Dan Gohman <gohman@apple.com> Teach SplitVectorOp how to split INSERT_VECTOR_ELT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42457 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
72292f07122de9c8bd41b85e94cb2d3235eca0c9 28-Sep-2007 Dale Johannesen <dalej@apple.com> Fix long double -> uint64 conversion.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
317096ab3710fda0960be58804e9f80c800340f6 28-Sep-2007 Dale Johannesen <dalej@apple.com> Add sqrt and powi intrinsics for long double.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42423 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
64f638df568f2849b485cc50836efc734e367fc7 27-Sep-2007 Evan Cheng <evan.cheng@apple.com> Silence a compiler warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42389 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f41db2136fe50e1a92aabfcb3ba1ec1f70f5f0d5 26-Sep-2007 Dale Johannesen <dalej@apple.com> Fix f80 UNDEF.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e40c7b097354974ebd42c7e5d54440b07b57cc33 24-Sep-2007 Dan Gohman <gohman@apple.com> Use the correct result value type instead of using getValueType(0)
in ExpandEXTRACT_VECTOR_ELT and SplitVectorOp. This fixes an abort
in the included testcase.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
910993e8dc49a25d9da3b53de4a82568c14e91cc 22-Sep-2007 Dale Johannesen <dalej@apple.com> Change APFloat::convertFromInteger to take the incoming
bit width instead of number of words allocated, which
makes it actually work for int->APF conversions.
Adjust callers. Add const to one of the APInt constructors
to prevent surprising match when called with const
argument.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
73328d14acba0144f121b557ce0e1539c6a21a18 20-Sep-2007 Dale Johannesen <dalej@apple.com> More long double fixes. x86_64 should build now.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f4d4832724eb45f94d63e6a7ab932b8f77279587 19-Sep-2007 Dale Johannesen <dalej@apple.com> Fix longdouble -> uint conversion.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
118cd9dbbad3a47f37dc1b1529ef920e4d5e13f6 16-Sep-2007 Dale Johannesen <dalej@apple.com> Adjust per revew comments.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9e3d3abd937c9bb79d56d25ec0e0724c7cbba67c 15-Sep-2007 Dale Johannesen <dalej@apple.com> Remove the assumption that FP's are either float or
double from some of the many places in the optimizers
it appears, and do something reasonable with x86
long double.
Make APInt::dump() public, remove newline, use it to
dump ConstantSDNode's.
Allow APFloats in FoldingSet.
Expand X86 backend handling of long doubles (conversions
to/from int, mostly).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9d5f45607793052bf5b4436d1b43013fab9999ac 12-Sep-2007 Dale Johannesen <dalej@apple.com> Revise previous patch per review comments.
Next round of x87 long double stuff.
Getting close now, basically works.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3f6eb7419de437436265831fce92f62498556e08 11-Sep-2007 Dale Johannesen <dalej@apple.com> Add APInt interfaces to APFloat (allows directly
access to bits). Use them in place of float and
double interfaces where appropriate.
First bits of x86 long double constants handling
(untested, probably does not work).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f7331b3dd72409e644833ecaf62a0f6db03c97ee 11-Sep-2007 Duncan Sands <baldrick@free.fr> Fold the adjust_trampoline intrinsic into
init_trampoline. There is now only one
trampoline intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41841 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
907f28ce3032e67c02a50095659e901de867dd3c 08-Sep-2007 Dale Johannesen <dalej@apple.com> Implement misaligned FP loads and stores.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f04afdbb48568ef09f11fd10ac03426101f2dbf8 30-Aug-2007 Dale Johannesen <dalej@apple.com> Change LegalFPImmediates to use APFloat.
Add APFloat interfaces to ConstantFP, SelectionDAG.
Fix integer bit in double->APFloat conversion.
Convert LegalizeDAG to use APFloat interface in
ConstantFPSDNode uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
055c5449a4046a5e1a5210d2f91aee4e3901cccf 30-Aug-2007 Anton Korobeynikov <asl@math.spbu.ru> Fix use of declaration inside case block


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41584 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
066f7b40f8c442dfd52cdbc371a5f6c623d5ba90 29-Aug-2007 Anton Korobeynikov <asl@math.spbu.ru> Lower FRAME_TO_ADDR_OFFSET to zero by default (if not custom lowered)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
09ec1b058331aadb29a348091611d23892b5c492 25-Aug-2007 Chris Lattner <sabre@nondot.org> Allow target constants to be illegal types. The target should
know how to handle them. This fixes
test/CodeGen/Generic/asm-large-immediate.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3e20bba5eb5df2fdd3e6655c8470084cf05032d4 17-Aug-2007 Evan Cheng <evan.cheng@apple.com> Avoid issue on 64-bit hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
61bbbabe3da27479cc9a3a36e49091a1141ba7a3 17-Aug-2007 Evan Cheng <evan.cheng@apple.com> If dynamic_stackalloc alignment is > stack alignment, first issue an instruction to align the stack ptr before the decrement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41133 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c90f08936d717ac6aa767c28cee7af4366eb6921 16-Aug-2007 Lauro Ramos Venancio <lauro.venancio@gmail.com> Implement FPOWI ExpandOp.
Fix PR1287.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ab081c7195ad0b2bc9a13fa718f2bbffe54ac61c 09-Aug-2007 Dale Johannesen <dalej@apple.com> Update per review comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40965 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5411a3937f4303f9c3fc50be92f985a4532d95e6 09-Aug-2007 Dale Johannesen <dalej@apple.com> long double 9 of N. This finishes up the X86-32 bits
(constants are still not handled). Adds ConvertActions
to control fp-to-fp conversions (these are currently
defaulted for all other targets, so no changes there).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c1513d24eab4b193c951f3cad450ef344e88e0a6 09-Aug-2007 Scott Michel <scottm@aero.org> If a target really needs to custom lower constants, it should be allowed
to do so.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40955 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
335f4f77882ace48bcdfb7a6019367bf9f4857cd 02-Aug-2007 Scott Michel <scottm@aero.org> Style police: Expand the tabs to spaces!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40712 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f3c13c82e34b8e90f1080cfe06c6f1328a2d44e1 01-Aug-2007 Lauro Ramos Venancio <lauro.venancio@gmail.com> Expand unaligned loads/stores when the target doesn't support them. (PR1548)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40682 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
910b66d8d6fd8a27dcdea74431e3ea20c69b7db5 30-Jul-2007 Scott Michel <scottm@aero.org> - Allow custom lowering for CTPOP, CTTZ, CTLZ.
- Fixed an existing unexpanded tab.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
36397f50343639ce9a25996f2d790c656791ab92 27-Jul-2007 Duncan Sands <baldrick@free.fr> Support for trampolines, except for X86 codegen which is
still under discussion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40549 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
557c3631d320c5731e55b6f818a1c7b2d4d97176 26-Jul-2007 Christopher Lamb <christopher.lamb@gmail.com> Add selection DAG nodes for subreg insert/extract. PR1350


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
844228a631f47bb39f71f617063831fb83c3843b 26-Jul-2007 Christopher Lamb <christopher.lamb@gmail.com> Fix infinite recursion for when extract_vector_elt is legal. Unfortunately no public targets use this code-path, so no test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
07a96765daedf180a7102d39fe56c499878312b7 16-Jul-2007 Dan Gohman <gohman@apple.com> Fix comments about vectors to use the current wording.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39921 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6d4b711e7f2e27d94d3c49dc9e7575dbe0f242e0 14-Jul-2007 Nick Lewycky <nicholas@mxc.ca> Fix the build. Patch from Holger Schurig.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2365f51ed03afe6993bae962fdc2e5a956a64cd5 14-Jul-2007 Anton Korobeynikov <asl@math.spbu.ru> Long live the exception handling!

This patch fills the last necessary bits to enable exceptions
handling in LLVM. Currently only on x86-32/linux.

In fact, this patch adds necessary intrinsics (and their lowering) which
represent really weird target-specific gcc builtins used inside unwinder.

After corresponding llvm-gcc patch will land (easy) exceptions should be
more or less workable. However, exceptions handling support should not be
thought as 'finished': I expect many small and not so small glitches
everywhere.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a346615d11f0a560c6e7280c1e614301d9f93051 13-Jul-2007 Dan Gohman <gohman@apple.com> Fix the comment for LegalizeOp to more accurately reflect what it does.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c63d391c9a886d58c6a53a7f565fbd544b076d9f 10-Jul-2007 Evan Cheng <evan.cheng@apple.com> Move DenseMapKeyInfo<SDOperand> from LegalizeDAG.cpp to SelectionDAGNodes.h

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38484 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d6fd1bc122ba791c698255d8be158b8ec424e248 10-Jul-2007 Dan Gohman <gohman@apple.com> Preserve volatililty and alignment information when lowering or
simplifying loads and stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38473 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
849f214a4e3676e41168b0c5398165c4d4fb99f8 03-Jul-2007 Dale Johannesen <dalej@apple.com> Fix for PR 1505 (and 1489). Rewrite X87 register
model to include f32 variants. Some factoring
improvments forthcoming.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
10a7aa6dea8d862feda05098d82a7630c80c30d8 29-Jun-2007 Dan Gohman <gohman@apple.com> Fix an assertion failure in legalizing bitcast operators on targets where
vectors are split down to single elements as part of legalization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6595cb3000d7f5f8e9a76d556aa8609db91b7887 27-Jun-2007 Dan Gohman <gohman@apple.com> Rename ("shrinkify") MVT::isExtendedValueType to MVT::isExtendedVT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37758 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
89b20c07e9f9539b141c5251ac67cc38afa637d5 27-Jun-2007 Dan Gohman <gohman@apple.com> Make the comment for ScalarizeVectorOp mention that it is only for use
with single-element vectors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37752 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7f32156bb9c017b71971c52fac892fa7b9b06dd2 25-Jun-2007 Dan Gohman <gohman@apple.com> Generalize MVT::ValueType and associated functions to be able to represent
extended vector types. Remove the special SDNode opcodes used for pre-legalize
vector operations, and the special MVT::Vector type used with them. Adjust
lowering and legalize to work with the normal SDNode kinds instead, and to
use the normal MVT functions to work with vector types instead of using the
two special operands that the pre-legalize nodes held.

This allows pre-legalize and post-legalize DAGs, and the code that operates
on them, to be more consistent. Pre-legalize vector operators can be handled
more consistently with scalar operators. And, -view-dag-combine1-dags and
-view-legalize-dags now look prettier for vector code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ea859be53ca13a1547c4675549946b74dc3c6f41 22-Jun-2007 Dan Gohman <gohman@apple.com> Move ComputeMaskedBits, MaskedValueIsZero, and ComputeNumSignBits from
TargetLowering to SelectionDAG so that they have more convenient
access to the current DAG, in preparation for the ValueType routines
being changed from standalone functions to members of SelectionDAG for
the pre-legalize vector type changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2d74a318deed2b7957250cdcc04dc8e01924258b 21-Jun-2007 Dan Gohman <gohman@apple.com> Tidy up ValueType names in comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37688 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e10e6f7a36f6f60d1889465a4df51ac8cdb34365 18-Jun-2007 Chris Lattner <sabre@nondot.org> make ComputeTopDownOrdering significantly faster and use less stack space
by making it non-recursive


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
51eaa86758338d5935c0eff0469c418b1256aba7 15-Jun-2007 Dan Gohman <gohman@apple.com> Rename MVT::getVectorBaseType to MVT::getVectorElementType.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6595635175764f402e7a5e53216c8d46bdce8c28 13-Jun-2007 Dan Gohman <gohman@apple.com> Introduce new SelectionDAG node opcodes VEXTRACT_SUBVECTOR and
VCONCAT_VECTORS. Use these for CopyToReg and CopyFromReg legalizing in
the case that the full register is to be split into subvectors instead
of scalars. This replaces uses of VBIT_CONVERT to present values as
vector-of-vector types in order to make whole subvectors accessible via
BUILD_VECTOR and EXTRACT_VECTOR_ELT.

This is in preparation for adding extended ValueType values, where
having vector-of-vector types is undesirable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37569 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
39833585556a69de12053ca1e104fe7edfd86cbd 04-Jun-2007 Dan Gohman <gohman@apple.com> Pass the DAG to SDNode::dump to let it do more detailed dumps in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b55757ec5f6f0218342a8910e1bbd9f018adc7d7 18-May-2007 Dan Gohman <gohman@apple.com> Qualify several calls to functions in the MVT namespace, for consistency.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b429f7303eecc6fe0218d86e2f1321f70473deb4 17-May-2007 Chris Lattner <sabre@nondot.org> add expand support for ADDC/SUBC/ADDE/SUBE so we can codegen 128-bit add/sub on 32-bit (or less) targets


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37168 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b464c446791f03cd8abc0b55bab4d472de534218 05-May-2007 Chris Lattner <sabre@nondot.org> Propagate alignment/volatility in two places.

Implement support for expanding a bitcast from an illegal vector type to
a legal one (e.g. 4xi32 -> 4xf32 in SSE1). This fixes PR1371 and
CodeGen/X86/2007-05-05-VecCastExpand.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
44b2c5098f5cf766b4eff43d9eb0d8a9a143e7d8 28-Apr-2007 Chris Lattner <sabre@nondot.org> memory inputs to an inline asm are required to have an address available.
If the operand is not already an indirect operand, spill it to a constant
pool entry or a stack slot.

This fixes PR1356 and CodeGen/X86/2007-04-27-InlineAsm-IntMemInput.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
eb7f34f2cb1584f155b9cefdb246b300fb2fc9c4 27-Apr-2007 Chris Lattner <sabre@nondot.org> Fix incorrect legalization of EHSELECTOR. This fixes
CodeGen/Generic/2007-04-14-EHSelectorCrash.ll and PR1326


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4c6cfad85e63e2dbe273431bdf20533b495c955d 27-Apr-2007 Evan Cheng <evan.cheng@apple.com> Expand UINT_TO_FP in turns of SINT_TO_FP when UINTTOFP_* libcalls are not available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0d3b67809ccab229a03db8c1bede852fb89eb081 21-Apr-2007 Lauro Ramos Venancio <lauro.venancio@gmail.com> Allow the lowering of ISD::GLOBAL_OFFSET_TABLE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b3a0417cad8b625acc3033bd5e24afb9ffd0b084 20-Apr-2007 Lauro Ramos Venancio <lauro.venancio@gmail.com> Implement "general dynamic", "initial exec" and "local exec" TLS models for
X86 32 bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36283 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c9dc11457809b6641de853af2261721a97ad1f26 02-Apr-2007 Scott Michel <scottm@aero.org> 1. Insert custom lowering hooks for ISD::ROTR and ISD::ROTL.

2. Help DAGCombiner recognize zero/sign/any-extended versions of ROTR and ROTL
patterns. This was motivated by the X86/rotate.ll testcase, which should now
generate code for other platforms (and soon-to-come platforms.) Rewrote code
slightly to make it easier to read.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
82dcb4fe23686784a5ad6379860970f1146db50d 24-Mar-2007 Chris Lattner <sabre@nondot.org> don't rely on ADL


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d0b82b301d700217a716526f9329bb031e0d6578 07-Mar-2007 Anton Korobeynikov <asl@math.spbu.ru> Refactoring of formal parameter flags. Enable properly use of
zext/sext/aext stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35008 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
edf2e8da256496c19390cfd46da80746373e9989 06-Mar-2007 Chris Lattner <sabre@nondot.org> big endian 32-bit systems (e.g. ppc32) want to return the high reg first, not
the lo-reg first. This is fallout from my ppc calling conv change yesterday,
it fixes test/ExecutionEngine/2003-05-06-LivenessClobber.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8b2d42c9494a42c8b5b9e5c2e46c8001b89e75b5 04-Mar-2007 Chris Lattner <sabre@nondot.org> Fix CodeGen/Generic/fpowi-promote.ll and PR1239


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34893 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a9569f10de686119ff34b89e102b5a3cbafdf195 03-Mar-2007 Chris Lattner <sabre@nondot.org> Add an expand action for ISD label which just deletes the label.
This "fixes" PR1238.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8782d481a3c720304540254a7b71d25bbe7cbf49 28-Feb-2007 Jim Laskey <jlaskey@mac.com> Chain is on second operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34759 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e80873ee75a96916176c505aa0e3242edf1204d3 24-Feb-2007 Jim Laskey <jlaskey@mac.com> Drop unused operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34555 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2bc210d99f5a7322a1ae84775eba351d9ab6ea85 22-Feb-2007 Jim Laskey <jlaskey@mac.com> Simplify lowering and selection of exception ops.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34491 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b180aa17539e14a5430d020bbc7de83c79b7fc4b 21-Feb-2007 Jim Laskey <jlaskey@mac.com> Selection and lowering for exception handling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34481 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ac9dcb94dde5f166ee29372385c0e3b695227ab4 15-Feb-2007 Reid Spencer <rspencer@reidspencer.com> For PR1195:
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9d6565a5b1fbc4286d6ee638d8f47a3171a9ed7e 15-Feb-2007 Reid Spencer <rspencer@reidspencer.com> For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d2b7cec527a0efa552628378ebca7a8ca63bb45d 14-Feb-2007 Chris Lattner <sabre@nondot.org> Generalize TargetData strings, to support more interesting forms of data.
Patch by Scott Michel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4c948eb373779718e5be36d7674382b52114bf65 14-Feb-2007 Chris Lattner <sabre@nondot.org> implement expand of truncate. This allows truncates from i128 to i64 to
be supported on 32-bit hosts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2e67781ef571f5daffd7e6c2f71750be122e0ac9 08-Feb-2007 Evan Cheng <evan.cheng@apple.com> Make use of TLI.SimplifySetCC() in LegalizeSetCCOperands().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0ed44170752b85c3dd3bbf95459dd2668864f5ec 04-Feb-2007 Chris Lattner <sabre@nondot.org> swtich vector-> smallvector, speeding up selectiondag stuff 1%


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33861 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
40030bfa75ae6d72702bc60e964ae2fce8c0f3ed 04-Feb-2007 Chris Lattner <sabre@nondot.org> Switch promoted/expanded ops over to using a DenseMap. Vector related maps
aren't worth it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
718071c476014cb0aaff9c7d018120d5a8930217 04-Feb-2007 Chris Lattner <sabre@nondot.org> switch LegalizedNodes from std::map to a DenseMap. This speeds up isel
time as a whole on kc++ by 11%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33857 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
00755df36c1448ac4728a74d907aa09e3d8b2d49 04-Feb-2007 Chris Lattner <sabre@nondot.org> Eliminate some malloc traffic from LegalizeAllNodesNotLeadingTo, speeding
up isel on kimwitu by 0.7%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33853 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7971514755a08ec156a1b9c0f7f05d67919c56b7 03-Feb-2007 Chris Lattner <sabre@nondot.org> Switch ComputeTopDownOrdering over to using a densemap. This speeds up
isel as a whole by 3.3%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33809 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5efdecc030f1a71cdb5b49d97c6c1c45e68ff731 03-Feb-2007 Evan Cheng <evan.cheng@apple.com> Pasto


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b25fe8267182662750dcb76a70a20f4b14a5568d 01-Feb-2007 Anton Korobeynikov <asl@math.spbu.ru> Fixed uninitialized stuff inside LegalizeDAG. Fortunately, the only
affected part is codegen of "memove" inside x86 backend. This fixes
PR1144


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33752 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
fea997aac5773e936754de5436029c2a4fa1e930 01-Feb-2007 Chris Lattner <sabre@nondot.org> Fit in 80 columns


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33745 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d385fd62cb43435b3ad70d789198d34bf148e579 31-Jan-2007 Evan Cheng <evan.cheng@apple.com> Allow the target to override the ISD::CondCode that's to be used to test the
result of the comparison libcall against zero.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33701 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bcc5f36765e8111c13873a0c0dc874c92385d808 29-Jan-2007 Nate Begeman <natebegeman@mac.com> Finish off bug 680, allowing targets to custom lower frame and return
address nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ac2b2cf88c9331bf44e802f6d31805c40a56af0f 28-Jan-2007 Anton Korobeynikov <asl@math.spbu.ru> More cleanup


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b10308e440c80dd6ffb4b478f741ff7e5f30cb48 28-Jan-2007 Anton Korobeynikov <asl@math.spbu.ru> Propagate changes from my local tree. This patch includes:
1. New parameter attribute called 'inreg'. It has meaning "place this
parameter in registers, if possible". This is some generalization of
gcc's regparm(n) attribute. It's currently used only in X86-32 backend.
2. Completely rewritten CC handling/lowering code inside X86 backend.
Merged stdcall + c CCs and fastcall + fast CC.
3. Dropped CSRET CC. We cannot add struct return variant for each
target-specific CC (e.g. stdcall + csretcc and so on).
4. Instead of CSRET CC introduced 'sret' parameter attribute. Setting in
on first attribute has meaning 'This is hidden pointer to structure
return. Handle it gently'.
5. Fixed small bug in llvm-extract + add new feature to
FunctionExtraction pass, which relinks all internal-linkaged callees
from deleted function to external linkage. This will allow further
linking everything together.

NOTEs: 1. Documentation will be updated soon.
2. llvm-upgrade should be improved to translate csret => sret.
Before this, there will be some unexpected test fails.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
44c3b9fdd416c79f4b67cde1aecfced5921efd81 26-Jan-2007 Jim Laskey <jlaskey@mac.com> Change the MachineDebugInfo to MachineModuleInfo to better reflect usage
for debugging and exception handling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33550 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1ee29257428960fede862fcfdbe80d5d007927e9 26-Jan-2007 Jim Laskey <jlaskey@mac.com> Make LABEL a builtin opcode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
58092e35a3368e130438cbc793c8f9dce2e4fe0f 20-Jan-2007 Chris Lattner <sabre@nondot.org> Teach TargetData to handle 'preferred' alignment for each target, and use
these alignment amounts to align scalars when we can. Patch by Scott Michel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33409 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c10305743c313558405079452138f03124e87581 19-Jan-2007 Reid Spencer <rspencer@reidspencer.com> For PR1043:
This is the final patch for this PR. It implements some minor cleanup
in the use of IntegerType, to wit:
1. Type::getIntegerTypeMask -> IntegerType::getBitMask
2. Type::Int*Ty changed to IntegerType* from Type*
3. ConstantInt::getType() returns IntegerType* now, not Type*

This also fixes PR1120.

Patch by Sheng Zhou.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
56966225d1eed9f9a6951d2167bfbbec9628c8d6 12-Jan-2007 Evan Cheng <evan.cheng@apple.com> Store default libgcc routine names and allow them to be redefined by target.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
636c753b6ba2418ed707ef0efb31444ec70a46f2 06-Jan-2007 Evan Cheng <evan.cheng@apple.com> Expand fcopysign to the bitwise sequence if select is marked as expensive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
068c5f47ea9243b353a49ca7eb07fac0cb32f1ee 05-Jan-2007 Evan Cheng <evan.cheng@apple.com> Bug in ExpandFCOPYSIGNToBitwiseOps(). Clear the old sign bit of operand 0
before or'ing in the sign bit of operand 1.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
912095becac923ff614d7b07728eb345ada67765 04-Jan-2007 Evan Cheng <evan.cheng@apple.com> Expand fcopysign to a series of bitwise of operations when it's profitable to
do so.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b47b25cfda5aee910e128c89d08c630722eb480b 03-Jan-2007 Reid Spencer <rspencer@reidspencer.com> Clean up from recent changes. Comment the new parameter to ExpandLibCall.
Consolidate some lines of code and remove duplication.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
47857812e29324a9d1560796a05b53d3a9217fd9 31-Dec-2006 Reid Spencer <rspencer@reidspencer.com> For PR950:
Three changes:
1. Convert signed integer types to signless versions.
2. Implement the @sext and @zext parameter attributes. Previously the
type of an function parameter was used to determine whether it should
be sign extended or zero extended before the call. This information is
now communicated via the function type's parameter attributes.
3. The interface to LowerCallTo had to be changed in order to accommodate
the parameter attribute information. Although it would have been
convenient to pass in the FunctionType itself, there isn't always one
present in the caller. Consequently, a signedness indication for the
result type and for each parameter was provided for in the interface
to this method. All implementations were changed to make the adjustment
necessary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7df28dc9d7160772c3c0aabd72c32830c1bb5e57 19-Dec-2006 Evan Cheng <evan.cheng@apple.com> May need to promote the operand (either sign_extend_inreg or and) before
expanding a {s|u}int_to_fp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32665 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
722cb360690e5d7742b01a9f497fdb65bf8079d5 18-Dec-2006 Evan Cheng <evan.cheng@apple.com> LegalizeSetCCOperands() may end up inserting libcalls. They need to be
properly serialized. Do not clear LastCallSEQ_END until that is done.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32659 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
aa975c1c4785a1d7930f2cd1026cb40ce54d21e4 16-Dec-2006 Evan Cheng <evan.cheng@apple.com> Expand FP undef


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0b1b9dcf22745b533562134c2f0472098fe085fd 16-Dec-2006 Evan Cheng <evan.cheng@apple.com> Allow promoted FP_TO_UINT / FP_TO_SINT to expand operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
966bf24491f7e53238fc4127bb9fcf43e6739586 16-Dec-2006 Evan Cheng <evan.cheng@apple.com> Expand fabs / fneg to and / xor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
19103b11ecbd5153537a1c64ffefa922fe591add 15-Dec-2006 Evan Cheng <evan.cheng@apple.com> Fix select_cc, select expansion to soft-fp bugs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32616 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2d53a320b4dbcd4af54b17458ed81c3963b544fd 15-Dec-2006 Chris Lattner <sabre@nondot.org> silence a bogus warning


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2b49c500838666dd0186d021389d4dd70ffda240 15-Dec-2006 Evan Cheng <evan.cheng@apple.com> Expand FP compares to soft-fp call(s)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
acd80ac7bb19f8bdfa55336d567c9ecbe695c8b8 14-Dec-2006 Jim Laskey <jlaskey@mac.com> 1. Tidy up jump table info.
2. Allow the jit to handle PIC relocable jump tables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9f87788040786b1bc6530763e4cf7e105bfb2924 13-Dec-2006 Evan Cheng <evan.cheng@apple.com> More soft-fp work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
548f611baeb53e821e7e80f97722b048ab6b09b2 13-Dec-2006 Evan Cheng <evan.cheng@apple.com> Expand (f64 extload f32) to (f64 fp_ext (load f32)) if f64 type action is expand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32527 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
98ff3b979af4916ba8a82eda7d77a66cdad31842 13-Dec-2006 Evan Cheng <evan.cheng@apple.com> Expand fsqrt, fsin, and fcos to libcalls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6af00d588c1b353d9d7a3dd8f58927056eccd6c1 13-Dec-2006 Evan Cheng <evan.cheng@apple.com> Expand f32 / f64 to i32 / i64 conversion to soft-fp library calls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
279101eb1ac61e2d5b83d5bdcc5be56e710d2cd7 12-Dec-2006 Evan Cheng <evan.cheng@apple.com> Expand FP constant to integers if FP types are not legal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5c9ce1893a4bee65bc05c7c48f11734f55405692 12-Dec-2006 Evan Cheng <evan.cheng@apple.com> Soft fp FNEG, SINT_TO_FP, UINT_TO_FP libcall expansion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32495 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
004952140f3cf92ee098c2c5b8cdee1449bdc2ed 12-Dec-2006 Evan Cheng <evan.cheng@apple.com> Expand ConstantFP to load from CP if float types are being expanded.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7b2b5c846c371f58db73f453a007e52eda62da89 12-Dec-2006 Evan Cheng <evan.cheng@apple.com> - When expanding a bit_convert whose src operand is also to be expanded and
its expansion result type is equal to the result type of the bit_convert,
e.g. (i64 bit_convert (f64 op)) if FP is not legal
returns the result of the expanded source operand.
- Store f32 / f64 may be expanded to a single store i32/i64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32490 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f0094839f058f56983f674ca575fcfda23d495ca 12-Dec-2006 Chris Lattner <sabre@nondot.org> fit in 80 cols


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32474 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d9e06a5d031ca370e3137c93f4bd1b97c719633d 12-Dec-2006 Chris Lattner <sabre@nondot.org> this can only be fptrunc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32473 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d93d46ee7e0a0e539d42139b85c71b2b8c3968fe 12-Dec-2006 Chris Lattner <sabre@nondot.org> Revert Nate's patch to fix X86/store-fp-constant.ll. With the dag combiner
and legalizer separated like they currently are, I don't see a way to handle
this xform.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
15f46d6c280cc91be70c60ed181931fbe0088652 12-Dec-2006 Reid Spencer <rspencer@reidspencer.com> Change inferred cast creation calls to more specific cast creations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
13acce3ef03d29679c2b241bdba6ca015644e8b6 11-Dec-2006 Evan Cheng <evan.cheng@apple.com> Re-apply changes that were backed out and fix a naughty typo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32442 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
70a24b3141c098d67321dda4d6f615a9153d7d9b 11-Dec-2006 Chris Lattner <sabre@nondot.org> Revert changes that broke oggenc on ppc


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bbf1e5e2e9608d6077bc4ac03e884c1972148fe0 11-Dec-2006 Evan Cheng <evan.cheng@apple.com> f32 / f64 node is expanded to one i32 / i64 node.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b618230231273e9e609b9a39b8eb4684820b7149 11-Dec-2006 Evan Cheng <evan.cheng@apple.com> Clean up some bad code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32432 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2cbba8934745fe30662f2d5a59d03545ad5212c5 11-Dec-2006 Nate Begeman <natebegeman@mac.com> Move something that should be in the dag combiner from the legalizer to the
dag combiner.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1a8f1fe676f1d83e0da7336e744ebcdcc14a88c4 09-Dec-2006 Evan Cheng <evan.cheng@apple.com> Preliminary soft float support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
832171cb9724d2d31c8dfb73172e2be8f6dd13ee 07-Dec-2006 Bill Wendling <isanbard@gmail.com> Removing even more <iostream> includes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32320 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6a16c5ab2d7786583d3c9a79646dc85fbda6cd41 29-Nov-2006 Evan Cheng <evan.cheng@apple.com> Avoid inifinite looping if READCYCLECOUNTER isn't custom lowered.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f0b3ba6752a49a8868d423ddc2704a52b7101571 29-Nov-2006 Evan Cheng <evan.cheng@apple.com> Allow target to custom lower READCYCLECOUNTER (when it doesn't have to be expanded).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b6c806045bbd4a650f90f613a96cee01a1584412 28-Nov-2006 Chris Lattner <sabre@nondot.org> Fix PR1016


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31950 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f9908172e980aab15a36bd110ccdbc5f7afa44f6 27-Nov-2006 Chris Lattner <sabre@nondot.org> If a brcond condition is promoted, make sure to zero extend it, even if not
expanded into BR_CC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
fa9aa2b424d0a7d9f7201f8fdcf5ccfa05db3a80 07-Nov-2006 Chris Lattner <sabre@nondot.org> Fix PR988 and CodeGen/Generic/2006-11-06-MemIntrinsicExpand.ll.
The low part goes in the first operand of expandop, not the second one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31487 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3ed469ccd7b028a030b550d84b7336d146f5d8fa 02-Nov-2006 Reid Spencer <rspencer@reidspencer.com> For PR786:
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31380 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d063189c0958536aae7ecebec5676541b2cdef9b 31-Oct-2006 Evan Cheng <evan.cheng@apple.com> Fix a typo which can break jumptables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31305 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3d4ce1108520a4dcf31cb01523e145d286ee64c1 30-Oct-2006 Evan Cheng <evan.cheng@apple.com> Lower jumptable to BR_JT. The legalizer can lower it to a BRIND or let the target custom lower it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b83eb6447ba155342598f0fabe1f08f5baa9164a 20-Oct-2006 Reid Spencer <rspencer@reidspencer.com> For PR950:
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8b2794aeff151be8cdbd44786c1d0f94f8f2e427 13-Oct-2006 Evan Cheng <evan.cheng@apple.com> Merge ISD::TRUNCSTORE to ISD::STORE. Switch to using StoreSDNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2d84c4c7b314242346dea1a7f48563333476a4d5 11-Oct-2006 Jim Laskey <jlaskey@mac.com> Typo


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2e49f090f9656af7d5ed4d5c4e9fa26af59c7233 11-Oct-2006 Evan Cheng <evan.cheng@apple.com> Naming consistency.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
82c3d8f81ab20dc7571f29ffc46a5bb1b7ed8323 11-Oct-2006 Andrew Lenharth <andrewl@lenharth.org> Jimptables working again on alpha.

As a bonus, use the GOT node instead of the AlphaISD::GOT for internal stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
55b5708b6bbffc79cf133c31faa51d144bfc5d4a 10-Oct-2006 Chris Lattner <sabre@nondot.org> Fix another bug in extload promotion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30857 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
62f2a3c7aa0eba3e7bc5e2d59e268c5e1f48fb46 10-Oct-2006 Evan Cheng <evan.cheng@apple.com> Fix a bug introduced by my LOAD/LOADX changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30853 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
466685d41a9ea4905b9486fea38e83802e46f196 09-Oct-2006 Evan Cheng <evan.cheng@apple.com> Reflects ISD::LOAD / ISD::LOADX / LoadSDNode changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30844 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ed83a7019be05c2ed16a134fc9a708eb25dcd641 07-Oct-2006 Chris Lattner <sabre@nondot.org> Fix a bug legalizing zero-extending i64 loads into 32-bit loads. The bottom
part was always forced to be sextload, even when we needed an zextload.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4bdd2753db4a9d92b64c68b042c8b38f7223238d 06-Oct-2006 Chris Lattner <sabre@nondot.org> Fix a miscompilation of:

long long foo(long long X) {
return (long long)(signed char)(int)X;
}

Instead of:

_foo:
extsb r2, r4
srawi r3, r4, 31
mr r4, r2
blr

we now produce:

_foo:
extsb r4, r4
srawi r3, r4, 31
blr

This fixes a miscompilation in ConstantFolding.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
786225adf09e606c795ef68a1f789c12f37869f2 06-Oct-2006 Evan Cheng <evan.cheng@apple.com> Make use of getStore().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30759 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c548428c5d7328592f4db6f6cd815af18b3152a3 04-Oct-2006 Evan Cheng <evan.cheng@apple.com> Combine ISD::EXTLOAD, ISD::SEXTLOAD, ISD::ZEXTLOAD into ISD::LOADX. Add an
extra operand to LOADX to specify the exact value extension type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30714 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bf497a3a68b18472d8ad755bf483588b0caaa8cb 04-Oct-2006 Evan Cheng <evan.cheng@apple.com> Fix an obvious typo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30711 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
beec30eaf301bd6882cd06800b5175b94f033f9d 24-Sep-2006 Andrew Lenharth <andrewl@lenharth.org> Add support for other relocation bases to jump tables, as well as custom asm directives


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0ea26ca45b56b2b4cc1839cdbccc13a38b066969 20-Sep-2006 Chris Lattner <sabre@nondot.org> Expand 64-bit shifts more optimally if we know that the high bit of the
shift amount is one or zero. For example, for:

long long foo1(long long X, int C) {
return X << (C|32);
}

long long foo2(long long X, int C) {
return X << (C&~32);
}

we get:

_foo1:
movb $31, %cl
movl 4(%esp), %edx
andb 12(%esp), %cl
shll %cl, %edx
xorl %eax, %eax
ret
_foo2:
movb $223, %cl
movl 4(%esp), %eax
movl 8(%esp), %edx
andb 12(%esp), %cl
shldl %cl, %eax, %edx
shll %cl, %eax
ret

instead of:

_foo1:
subl $4, %esp
movl %ebx, (%esp)
movb $32, %bl
movl 8(%esp), %eax
movl 12(%esp), %edx
movb %bl, %cl
orb 16(%esp), %cl
shldl %cl, %eax, %edx
shll %cl, %eax
xorl %ecx, %ecx
testb %bl, %bl
cmovne %eax, %edx
cmovne %ecx, %eax
movl (%esp), %ebx
addl $4, %esp
ret
_foo2:
subl $4, %esp
movl %ebx, (%esp)
movb $223, %cl
movl 8(%esp), %eax
movl 12(%esp), %edx
andb 16(%esp), %cl
shldl %cl, %eax, %edx
shll %cl, %eax
xorl %ecx, %ecx
xorb %bl, %bl
testb %bl, %bl
cmovne %eax, %edx
cmovne %ecx, %eax
movl (%esp), %ebx
addl $4, %esp
ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30506 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6b5578f052c2405c0d622192ccacfd47563c99a8 19-Sep-2006 Evan Cheng <evan.cheng@apple.com> Fix a typo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30474 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
52cc1ea2a1a374b58801398460a6289723089d91 18-Sep-2006 Evan Cheng <evan.cheng@apple.com> Allow i32 UDIV, SDIV, UREM, SREM to be expanded into libcalls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8829dc88a8637fe588e299d96de394afc3ecc528 16-Sep-2006 Chris Lattner <sabre@nondot.org> Oh yeah, this is needed too


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a89654b1a17478a272af33221e325b7feb9aec1b 16-Sep-2006 Chris Lattner <sabre@nondot.org> simplify control flow, no functionality change


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30403 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7d7bffe157c0896cc850ed384dd748aae1a00c7b 16-Sep-2006 Chris Lattner <sabre@nondot.org> Allow custom expand of mul


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
79980b07dab50da1a8f572f9504674bfa853d484 13-Sep-2006 Chris Lattner <sabre@nondot.org> Compile X << 1 (where X is a long-long) to:

addl %ecx, %ecx
adcl %eax, %eax

instead of:

movl %ecx, %edx
addl %edx, %edx
shrl $31, %ecx
addl %eax, %eax
orl %ecx, %eax

and to:

addc r5, r5, r5
adde r4, r4, r4

instead of:

slwi r2,r9,1
srwi r0,r11,31
slwi r3,r11,1
or r2,r0,r2

on PPC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6ddf8ed6fe2d0aa5e15f7b9ad7e5049e2223bbd1 09-Sep-2006 Chris Lattner <sabre@nondot.org> Implement the fpowi now by lowering to a libcall


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30225 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f3f333dbd67afde147165bb5ba87889d76a6f436 09-Sep-2006 Chris Lattner <sabre@nondot.org> Allow targets to custom lower expanded BIT_CONVERT's


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30217 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3f4fd0fd644faec87330ef17ebcb93acb74da9c6 01-Sep-2006 Evan Cheng <evan.cheng@apple.com> Allow legalizer to expand ISD::MUL using only MULHS in the rare case that is
possible and the target only supports MULHS.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a4f0b3a084d120cfc5b5bb06f64b222f5cb72740 27-Aug-2006 Chris Lattner <sabre@nondot.org> s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29911 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f921a518912df706a8edf1f867f52e8afc6e2b55 21-Aug-2006 Chris Lattner <sabre@nondot.org> Fix PR861


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f9f37fc52c444e34bad7846729ae5481a65e0a53 15-Aug-2006 Chris Lattner <sabre@nondot.org> eliminate use of getNode that takes vector of valuetypes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29687 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bd564bfc63163e31f320c3da9749db70992dc35e 08-Aug-2006 Chris Lattner <sabre@nondot.org> Start eliminating temporary vectors used to create DAG nodes. Instead, pass
in the start of an array and a count of operands where applicable. In many
cases, the number of operands is known, so this static array can be allocated
on the stack, avoiding the heap. In many other cases, a SmallVector can be
used, which has the same benefit in the common cases.

I updated a lot of code calling getNode that takes a vector, but ran out of
time. The rest of the code should be updated, and these methods should be
removed.

We should also do the same thing to eliminate the methods that take a
vector of MVT::ValueTypes.

It would be extra nice to convert the dagiselemitter to avoid creating vectors
for operands when calling getTargetNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29566 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f06f35e30b4c4d7db304f717a3d4dc6595fbd078 08-Aug-2006 Chris Lattner <sabre@nondot.org> Eliminate some malloc traffic by allocating vectors on the stack. Change some
method that took std::vector<SDOperand> to take a pointer to a first operand
and #operands.

This speeds up isel on kc++ by about 3%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
190a418bf6b49a4ef1c1980229a2f0d516e8a2cd 04-Aug-2006 Chris Lattner <sabre@nondot.org> Make SelectionDAG::RemoveDeadNodes iterative instead of recursive, which
also make it simpler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29524 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c9cf4f1a7573ac7e379efd6ad15d7bd0a84a097c 27-Jul-2006 Chris Lattner <sabre@nondot.org> Fix a case where LegalizeAllNodesNotLeadingTo could take exponential time.
This manifested itself as really long time to compile
Regression/CodeGen/Generic/2003-05-28-ManyArgs.ll on ppc.
This is PR847.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29313 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e37fe9b3a1cadceb42ac27fa0718f5a10ea2f0e6 11-Jul-2006 Jim Laskey <jlaskey@mac.com> Ensure that dump calls that are associated with asserts are removed from
non-debug build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
25a022c7801b047b31d7610386e8a9ddca878cb1 11-Jul-2006 Chris Lattner <sabre@nondot.org> Fix CodeGen/Alpha/2006-07-03-ASMFormalLowering.ll and PR818.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
360e8200ec544a3c877ff74b48f445140ac9bbd6 28-Jun-2006 Chris Lattner <sabre@nondot.org> Mark these two classes as hidden, shrinking libllbmgcc.dylib by 25K


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28970 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8e7d056bc5c0688501f6721994c8f4074d699c69 27-May-2006 Evan Cheng <evan.cheng@apple.com> Change RET node to include signness information of the return values. e.g.
RET chain, value1, sign1, value2, sign2


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d74ea2bbd8bb630331f35ead42d385249bd42af8 24-May-2006 Chris Lattner <sabre@nondot.org> Patches to make the LLVM sources more -pedantic clean. Patch provided
by Anton Korobeynikov! This is a step towards closing PR786.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c5d7d7c715f7b7a4eeea1ceaafefc3d1d6df2add 17-May-2006 Chris Lattner <sabre@nondot.org> When we legalize target nodes, do not use getNode to create a new node,
use UpdateNodeOperands to just update the operands! This is important because
getNode will allocate a new node if the node returns a flag and this breaks
assumptions in the legalizer that you can legalize some things multiple times
and get exactly the same results.

This latent bug was exposed by my ppc patch last night, and this fixes
gsm/toast.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b248e16afd105fd8c01e08d8bf997b08ff08d127 17-May-2006 Chris Lattner <sabre@nondot.org> Add an assertion, avoid some unneeded work for each call. No functionality
change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f4ec817299a4187044a6162c2f520772b3ad69a0 17-May-2006 Chris Lattner <sabre@nondot.org> Add a new ISD::CALL node, make the default impl of TargetLowering::LowerCallTo
produce it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28338 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e2e41730ccfa9bebfabbd17ab3454aa2bb620b2a 16-May-2006 Chris Lattner <sabre@nondot.org> Legalize FORMAL_ARGUMENTS nodes correctly, we don't want to legalize them once
for each argument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28313 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a2d079a7763d01922e806e7874553da2ae4006af 13-May-2006 Chris Lattner <sabre@nondot.org> Merge identical code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ec57fd91af6be26a29535e7dd3dcb63beb71d898 09-May-2006 Nate Begeman <natebegeman@mac.com> Fix PR773


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a69571c7991813c93cba64e88eced6899ce93d81 03-May-2006 Owen Anderson <resistor@mac.com> Refactor TargetMachine, pushing handling of TargetData into the target-specific subclasses. This has one caller-visible change: getTargetData() now returns a pointer instead of a reference.

This fixes PR 759.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
37efe6764568a3829fee26aba532283131d1a104 22-Apr-2006 Nate Begeman <natebegeman@mac.com> JumpTable support! What this represents is working asm and jit support for
x86 and ppc for 100% dense switch statements when relocations are non-PIC.
This support will be extended and enhanced in the coming days to support
PIC, and less dense forms of jump tables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27947 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
89a1b380a475cbe477e50ff4b94335596b37f21a 20-Apr-2006 Chris Lattner <sabre@nondot.org> Simplify some code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27846 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
80edfb3af5ed214c5cd7797b37cb3bb024e98cc6 18-Apr-2006 Chris Lattner <sabre@nondot.org> Fix handling of calls in functions that use vectors. This fixes a crash on
the code in GCC PR26546.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8d5a894501b7546dee94df03118b90126c420820 17-Apr-2006 Chris Lattner <sabre@nondot.org> Codegen insertelement with constant insertion points as scalar_to_vector
and a shuffle. For this:

void %test2(<4 x float>* %F, float %f) {
%tmp = load <4 x float>* %F ; <<4 x float>> [#uses=2]
%tmp3 = add <4 x float> %tmp, %tmp ; <<4 x float>> [#uses=1]
%tmp2 = insertelement <4 x float> %tmp3, float %f, uint 2 ; <<4 x float>> [#uses=2]
%tmp6 = add <4 x float> %tmp2, %tmp2 ; <<4 x float>> [#uses=1]
store <4 x float> %tmp6, <4 x float>* %F
ret void
}

we now get this on X86 (which will get better):

_test2:
movl 4(%esp), %eax
movaps (%eax), %xmm0
addps %xmm0, %xmm0
movaps %xmm0, %xmm1
shufps $3, %xmm1, %xmm1
movaps %xmm0, %xmm2
shufps $1, %xmm2, %xmm2
unpcklps %xmm1, %xmm2
movss 8(%esp), %xmm1
unpcklps %xmm1, %xmm0
unpcklps %xmm2, %xmm0
addps %xmm0, %xmm0
movaps %xmm0, (%eax)
ret

instead of:

_test2:
subl $28, %esp
movl 32(%esp), %eax
movaps (%eax), %xmm0
addps %xmm0, %xmm0
movaps %xmm0, (%esp)
movss 36(%esp), %xmm0
movss %xmm0, 8(%esp)
movaps (%esp), %xmm0
addps %xmm0, %xmm0
movaps %xmm0, (%eax)
addl $28, %esp
ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2efce0a589e2a688a1a06b5dc2ed0db32ae79924 16-Apr-2006 Chris Lattner <sabre@nondot.org> Add support for promoting stores from one legal type to another, allowing us
to write one pattern for vector stores instead of 4.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3824e50b1e931f15e47bdf9edeb324737f236fe6 14-Apr-2006 Chris Lattner <sabre@nondot.org> Make this assertion better


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27695 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
cc9876124e7096d050e6750dd075758320f2cdce 12-Apr-2006 Evan Cheng <evan.cheng@apple.com> Promote vector AND, OR, and XOR


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
41f6cbbeb21d7d4376b8c0302b9766c3e43be5f2 12-Apr-2006 Evan Cheng <evan.cheng@apple.com> Vector type promotion for ISD::LOAD and ISD::SELECT


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27606 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
fdfded55888e35b76bb70231a5bb2f60877c2f6a 12-Apr-2006 Chris Lattner <sabre@nondot.org> Implement support for the formal_arguments node. To get this, targets shouldcustom legalize it and remove their XXXTargetLowering::LowerArguments overload


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27604 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
98f8aeb45fc1e54437cbb8f2a7445c609deab832 11-Apr-2006 Evan Cheng <evan.cheng@apple.com> Only get Tmp2 for cases where number of operands is > 1. Fixed return void.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27586 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b49e52c7e2d828c45583f862c0f7e1a4a2649aca 11-Apr-2006 Chris Lattner <sabre@nondot.org> add some todos


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f87324e44de88da5b3d57d6aeda5bc9d30f86374 11-Apr-2006 Chris Lattner <sabre@nondot.org> Add basic support for legalizing returns of vectors


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
db3c626eb9e85e9192dbee59ff0c4d143c37c94d 10-Apr-2006 Evan Cheng <evan.cheng@apple.com> Missing break


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b22e35a3c3bec07f5559c1476b3143e0d6d64269 09-Apr-2006 Chris Lattner <sabre@nondot.org> Add code generator support for VSELECT


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
17614ea63db9189050b6ca0310f535d12bdedb81 08-Apr-2006 Chris Lattner <sabre@nondot.org> Canonicalize vvector_shuffle(x,x) -> vvector_shuffle(x,undef) to enable patterns
to match again :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27533 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4ddd283f6928fc337c1bf3277566d7b31526e8d9 08-Apr-2006 Chris Lattner <sabre@nondot.org> add a sanity check: LegalizeOp should return a value that is the same type
as its input.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27528 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f6bf87f2cc685d13d6a8fa37693425956b33a840 08-Apr-2006 Evan Cheng <evan.cheng@apple.com> INSERT_VECTOR_ELT lowering bug:
store vector to $esp
store element to $esp + sizeof(VT) * index
load vector from $esp
The bug is VT is the type of the vector element, not the type of the vector!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
18dd6d0a2aeb3b827391f46996a7b40c9b1f907a 05-Apr-2006 Evan Cheng <evan.cheng@apple.com> Exapnd a VECTOR_SHUFFLE to a BUILD_VECTOR if target asks for it to be expanded
or custom lowering fails.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27432 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4352cc9e217e4482ad53f5a7b92c3543f569eb6e 04-Apr-2006 Chris Lattner <sabre@nondot.org> * Add supprot for SCALAR_TO_VECTOR operations where the input needs to be
promoted/expanded (e.g. SCALAR_TO_VECTOR from i8/i16 on PPC).
* Add support for targets to request that VECTOR_SHUFFLE nodes be promoted
to a canonical type, for example, we only want v16i8 shuffles on PPC.
* Move isShuffleLegal out of TLI into Legalize.
* Teach isShuffleLegal to allow shuffles that need to be promoted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27399 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4aab2f4ab50d2b04dc559c7b197f1de7612c896b 02-Apr-2006 Chris Lattner <sabre@nondot.org> Implement promotion for EXTRACT_VECTOR_ELT, allowing v16i8 multiplies to work with PowerPC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bc70cf8be95f33f9aa30c8c3d0fd79e3fa636360 02-Apr-2006 Chris Lattner <sabre@nondot.org> Implement the Expand action for binary vector operations to break the binop
into elements and operate on each piece. This allows generic vector integer
multiplies to work on PPC, though the generated code is horrible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5e46a19ec848cd4fc9649bd5170c43d9e657668c 02-Apr-2006 Chris Lattner <sabre@nondot.org> Add a new -view-legalize-dags command line option


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c741ea424a290373b24b06b77f161d06f08f7fa7 31-Mar-2006 Chris Lattner <sabre@nondot.org> Do not endian swap split vector loads. This fixes UnitTests/Vector/sumarray-dbl on PPC.

Now all UnitTests/Vector/* tests pass on PPC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d9731af75b38f30c02f19d6e81333b9c2599ad5f 31-Mar-2006 Chris Lattner <sabre@nondot.org> Do not endian swap the operands to a store if the operands came from a vector.

This fixes UnitTests/Vector/simple.c with altivec.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1597221eace1c53ce5f84a7018397497d11a8393 31-Mar-2006 Chris Lattner <sabre@nondot.org> Implement PromoteOp for VEXTRACT_VECTOR_ELT. Thsi fixes
Generic/vector.ll:test_extract_elt on non-sse X86 systems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27294 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2ae2e98d4f83a02b5e576ec7a0da74d8aebb38cf 31-Mar-2006 Chris Lattner <sabre@nondot.org> Scalarized vector stores need not be legal, e.g. if the vector element type
needs to be promoted or expanded. Relegalize the scalar store once created.
This fixes CodeGen/Generic/vector.ll:test1 on non-SSE x86 targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
70c2a61e0a0fb0a7e8b9bddd26bdcc92762772f0 31-Mar-2006 Chris Lattner <sabre@nondot.org> Significantly improve handling of vectors that are live across basic blocks,
handling cases where the vector elements need promotion, expansion, and when
the vector type itself needs to be decimated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27278 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
eb0b461cf4884bf2c98e463663a298e5c4ae9883 31-Mar-2006 Evan Cheng <evan.cheng@apple.com> Expand INSERT_VECTOR_ELT to store vec, sp; store elt, sp+k; vec = load sp;


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5b2316e2b06e0fb6aea31d9d3eb61376b40c23a6 28-Mar-2006 Chris Lattner <sabre@nondot.org> Teach Legalize how to pack VVECTOR_SHUFFLE nodes into VECTOR_SHUFFLE nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27232 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
48b61a729df6576c8833a83893d4086bddff69a5 28-Mar-2006 Chris Lattner <sabre@nondot.org> Tblgen doesn't like multiple SDNode<> definitions that map to the sameenum value. Split them into separate enums.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
13fc2f1d270cdedffb72b33621369cee9a2cdaaa 27-Mar-2006 Chris Lattner <sabre@nondot.org> Fix legalization of intrinsics with chain and result values


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27181 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
10d7fa62fffbceed580c34a00bd30f16643f6607 26-Mar-2006 Chris Lattner <sabre@nondot.org> Allow targets to custom lower their own intrinsics if desired.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27146 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
73d7b6029ac8b52a90f302d06831abcc04c77077 24-Mar-2006 Evan Cheng <evan.cheng@apple.com> Only to vector shuffle for {x,x,y,y} cases when SCALAR_TO_VECTOR is free.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2eb8653157ccd318b357af74bfd517c76ef166b8 24-Mar-2006 Chris Lattner <sabre@nondot.org> prefer to generate constant pool loads over splats. This prevents us from
using a splat for {1.0,1.0,1.0,1.0}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d1f04d40a078d6ca7c876b16a178992a109af774 24-Mar-2006 Chris Lattner <sabre@nondot.org> legalize vbit_convert nodes whose result is a legal type.
Legalize intrinsic nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27036 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
033e6816668da71ff0866a61f5c0a7e7e795d069 24-Mar-2006 Evan Cheng <evan.cheng@apple.com> Lower BUILD_VECTOR to VECTOR_SHUFFLE if there are two distinct nodes (and if
the target can handle it). Issue two SCALAR_TO_VECTOR ops followed by a
VECTOR_SHUFFLE to select from the two vectors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7692eb4201e2071fb2afddcdaa6ba93b5e6abad4 23-Mar-2006 Chris Lattner <sabre@nondot.org> add support for splitting casts. This implements
CodeGen/Generic/vector.ll:test_cast_2.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
408c428096df3a3970a8387f9dd258ae948663a6 23-Mar-2006 Chris Lattner <sabre@nondot.org> simplify some code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26972 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e25ca692c0478af5e15170fce23cea2a5b5fd0b9 22-Mar-2006 Chris Lattner <sabre@nondot.org> Implement simple support for vector casting. This can currently only handle
casts between legal vector types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
841c882f5dae8c953ea99b5824108313549cfaf8 22-Mar-2006 Chris Lattner <sabre@nondot.org> Endianness does not affect the order of vector fields. This fixes
SingleSource/UnitTests/Vector/build.c


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3b9fa89fcaf3eb08397c4c68b60c72fc73f8ab44 22-Mar-2006 Chris Lattner <sabre@nondot.org> Enclose some variables in a scope to avoid error with some gcc versions


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e35c218f3e8e15f96cb44c5fbc70c7ea20d6c962 21-Mar-2006 Chris Lattner <sabre@nondot.org> add expand support for extractelement


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
384504cea6c392125a2318d8bbb7f25aa0bbff7e 21-Mar-2006 Chris Lattner <sabre@nondot.org> add some trivial support for extractelement.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1c6191ffe764f3294cc2dda2bb3703403a416414 21-Mar-2006 Chris Lattner <sabre@nondot.org> Add a hacky workaround for crashes due to vectors live across blocks.
Note that this code won't work for vectors that aren't legal on the
target. Improvements coming.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
87100e0b83b808757bf44dabecd1d1048255d1ad 20-Mar-2006 Chris Lattner <sabre@nondot.org> If a target supports splatting with SHUFFLE_VECTOR, lower to it from BUILD_VECTOR(x,x,x,x)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4d3abee6183f110c9db56b94b0a4b5f8c985002a 19-Mar-2006 Chris Lattner <sabre@nondot.org> Allow SCALAR_TO_VECTOR to be custom lowered.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ce87215131efcc68dcf7fca61055ad783a7aeb0e 19-Mar-2006 Chris Lattner <sabre@nondot.org> Add SCALAR_TO_VECTOR support


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
74881908fec5de98175d41d6fa065971736b2119 19-Mar-2006 Chris Lattner <sabre@nondot.org> Don't bother storing undef elements of BUILD_VECTOR's


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5fcd0350be08acc2f0415941c1e2101f5a399622 19-Mar-2006 Chris Lattner <sabre@nondot.org> Implement expand of BUILD_VECTOR containing variable elements.
This implements CodeGen/Generic/vector.ll:test_variable_buildvector


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2332b9f16fe17d1886566729b2241b8cd90f9916 19-Mar-2006 Chris Lattner <sabre@nondot.org> implement basic support for INSERT_VECTOR_ELT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b2827b0901162169bb2692b77a839c9767849134 19-Mar-2006 Chris Lattner <sabre@nondot.org> Rename ConstantVec -> BUILD_VECTOR and VConstant -> VBUILD_VECTOR. Allow*BUILD_VECTOR to take variable inputs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
23d564c11fbe628dbebd6d8f09d7d07fa862b719 19-Mar-2006 Chris Lattner <sabre@nondot.org> implement vector.ll:test_undef


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26845 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4794a6b6a09e3440438cd653ec09cf0c2e45be1c 19-Mar-2006 Chris Lattner <sabre@nondot.org> Fix the remaining bugs in the vector expansion rework I commited yesterday.
This fixes CodeGen/Generic/vector.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c7029805ef35ce9805931067b841e6af11db382e 18-Mar-2006 Chris Lattner <sabre@nondot.org> Change the structure of lowering vector stuff. Note: This breaks some
things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26840 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
81e8097377529dc3b666f33bb525c49cfbac3f51 17-Mar-2006 Nate Begeman <natebegeman@mac.com> Remove BRTWOWAY*
Make the PPC backend not dependent on BRTWOWAY_CC and make the branch
selector smarter about the code it generates, fixing a case in the
readme.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
06ac6ab938cf54596202de851da4b20aa61fe64e 15-Mar-2006 Chris Lattner <sabre@nondot.org> Add a note, this code should be moved to the dag combiner.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8f4191d61978529e9e9d7ddc24dbcd528ef7dd4c 13-Mar-2006 Chris Lattner <sabre@nondot.org> For targets with FABS/FNEG support, lower copysign to an integer load,
a select and FABS/FNEG.

This speeds up a trivial (aka stupid) copysign benchmark I wrote from 6.73s
to 2.64s, woo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6b24af87e6af1d2e8beb644554e06fcb5d620182 08-Mar-2006 Chris Lattner <sabre@nondot.org> revert the previous patch, didn't mean to check it in yet


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5874f82564d6cd9da086cc705e1c5c8ec8ff8361 08-Mar-2006 Chris Lattner <sabre@nondot.org> remove "Slot", it is dead


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a09f848c11c9db3c2614e0275a3256310ac26653 05-Mar-2006 Chris Lattner <sabre@nondot.org> Codegen copysign[f] into a FCOPYSIGN node


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3e1ce5a44d3d59b2b9ca68a21261f0f487d69269 03-Mar-2006 Evan Cheng <evan.cheng@apple.com> Add more vector NodeTypes: VSDIV, VUDIV, VAND, VOR, and VXOR.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
41edaa0529997e41a2bd64efd5f3e8027c67d99f 03-Mar-2006 Chris Lattner <sabre@nondot.org> remove the read/write port/io intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26479 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
860771d2d86243b65ec16fac6cc57b285078f138 01-Mar-2006 Evan Cheng <evan.cheng@apple.com> Vector ops lowering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
dca7abed918c8191de6e258ddf394cf11de240f2 20-Feb-2006 Chris Lattner <sabre@nondot.org> Fix a problem on itanium with memset. The value to set has been promoted to
i64 before this code, so zero_ext doesn't work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
551bf3f80058a026b6a128dffd5530019e1df1b9 17-Feb-2006 Nate Begeman <natebegeman@mac.com> kill ADD_PARTS & SUB_PARTS and replace them with fancy new ADDC, ADDE, SUBC
and SUBE nodes that actually expose what's going on and allow for
significant simplifications in the targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
25125697fb0a761da440b222671cf2d6d4deaeac 17-Feb-2006 Chris Lattner <sabre@nondot.org> Fix another miscompilation exposed by lencode, where we lowered i64->f32
conversions to __floatdidf instead of __floatdisf on targets that support
f32 but not i64 (e.g. sparc).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d0e58e36a9857c45ecdc910ec8db04c21e143db5 15-Feb-2006 Jim Laskey <jlaskey@mac.com> Should not combine ISD::LOCATIONs until we have scheme to remove from
MachineDebugInfo tables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4b653a0405bb16b555334d134c1eb8a97366ec3d 14-Feb-2006 Chris Lattner <sabre@nondot.org> Fix a latent bug in the call sequence handling stuff. Some targets (e.g. x86)
create these nodes with flag results. Remember that we legalized them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26156 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6831a815999dde4cf801e2076e66b4943964daf2 13-Feb-2006 Chris Lattner <sabre@nondot.org> Completely rewrite libcall insertion by the legalizer, providing the
following handy-dandy properties:

1. it is always correct now
2. it is much faster than before
3. it is easier to understand

This implementation builds off of the recent simplifications of the
legalizer that made it single-pass instead of iterative.

This fixes JM/lencod, JM/ldecod, and
CodeGen/Generic/2006-02-12-InsertLibcall.ll (at least on PPC).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26144 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
da06e9e665a1a94886541ed85e97315f58b357b0 01-Feb-2006 Nate Begeman <natebegeman@mac.com> *** empty log message ***


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
750ac1bdfa6f09bddfd9efce1d6360dde8fa74c0 01-Feb-2006 Nate Begeman <natebegeman@mac.com> Fix some of the stuff in the PPC README file, and clean up legalization
of the SELECT_CC, BR_CC, and BRTWOWAY_CC nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
59ad781e0118021d1ca7dfbc9f8db2ed828745e0 31-Jan-2006 Evan Cheng <evan.cheng@apple.com> Allow custom lowering of fabs. I forgot to check in this change which
caused several test failures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
19c5c4cca9edd0e1e2961879d3da164325af6d63 31-Jan-2006 Chris Lattner <sabre@nondot.org> Only insert an AND when converting from BR_COND to BRCC if needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
73e142f2b6a3b5223de2d557d646f319ca8168cf 30-Jan-2006 Chris Lattner <sabre@nondot.org> Fix a bug in my legalizer reworking that caused the X86 backend to not get
a chance to custom legalize setcc, which broke a bunch of C++ Codes.
Testcase here: CodeGen/X86/2006-01-30-LongSetcc.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0e753d617be1ff6a9ac0f894da9d2544e2489850 30-Jan-2006 Chris Lattner <sabre@nondot.org> don't insert an and node if it isn't needed here, this can prevent folding
of lowered target nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25804 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6862dbc446f2f633f6f4905d07a3bafd96741da2 29-Jan-2006 Chris Lattner <sabre@nondot.org> Fix RET of promoted values on targets that custom expand RET to a target node.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
68a17febc70d9beb5353454e0c6d136ca1e87605 29-Jan-2006 Chris Lattner <sabre@nondot.org> cleanups to the ValueTypeActions interface


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
70814bc38435d61a8c7cc32f2375c09e21f12a8a 29-Jan-2006 Chris Lattner <sabre@nondot.org> Remove some special case hacks for CALLSEQ_*, using UpdateNodeOperands
instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8ca05e0c302e15d6365afd2a0ea5fe15c9e85758 29-Jan-2006 Chris Lattner <sabre@nondot.org> Allow custom expansion of ConstantVec nodes. PPC will use this in the future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25774 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3181a771ff5b2090b7ed55f9b18a684ea8fe625a 29-Jan-2006 Chris Lattner <sabre@nondot.org> Legalize ConstantFP into TargetConstantFP when the target allows. Implement
custom expansion of ConstantFP nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25772 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
03d5e877fd30d7f18546e6df8fd60837081ad8cc 29-Jan-2006 Chris Lattner <sabre@nondot.org> eliminate uses of SelectionDAG::getBR2Way_CC


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25767 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c52ad4f04ea5f51a1b4c67e585acea5c0525fc3d 28-Jan-2006 Chris Lattner <sabre@nondot.org> Use the new "UpdateNodeOperands" method to simplify LegalizeDAG and make it
faster. This cuts about 120 lines of code out of the legalizer (mostly code
checking to see if operands have changed).

It also fixes an ugly performance issue, where the legalizer cloned the entire
graph after any change. Now the "UpdateNodeOperands" method gives it a chance
to reuse nodes if the operands of a node change but not its opcode or valuetypes.

This speeds up instruction selection time on kimwitu++ by about 8.2% with a
release build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
948c1b1cda280c6428dbeaa03a6c2c559dbb93f4 28-Jan-2006 Chris Lattner <sabre@nondot.org> minor tweaks


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25740 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
22cde6a518782cafc2115ad8d8233f79c9e9d52e 28-Jan-2006 Chris Lattner <sabre@nondot.org> move a bunch of code, no other change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25739 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7cd2997a83444b4ce14644db1a985f6c717f765e 28-Jan-2006 Chris Lattner <sabre@nondot.org> remove a couple more now-extraneous legalizeop's


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5c62f337fe846247f5e72acb32844e24b4f18b71 28-Jan-2006 Chris Lattner <sabre@nondot.org> fix a bug


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
456a93afcec7740c45cafa8354317f7b17987a6d 28-Jan-2006 Chris Lattner <sabre@nondot.org> Several major changes:

1. Pull out the expand cases for BSWAP and CT* into a separate function,
reducing the size of LegalizeOp.
2. Fix a bug where expand(bswap i64) was wrong when i64 is legal.
3. Changed LegalizeOp/PromoteOp so that the legalizer never needs to be
iterative. It now operates in a single pass over the nodes.
4. Simplify a LOT of code, with a net reduction of ~280 lines.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8137c9e41d69943ac84066e6c7a95390b84e29f2 28-Jan-2006 Chris Lattner <sabre@nondot.org> Eliminate the need for ExpandOp to set 'needsanotheriteration', as it already
relegalizes the stuff it returns.

Add the ability to custom expand ADD/SUB, so that targets don't need to deal
with ADD_PARTS/SUB_PARTS if they don't want.

Fix some obscure potential bugs and simplify code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25732 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9c6b4b8c3a48aa420f6499ca6c1a356f74e100f8 28-Jan-2006 Chris Lattner <sabre@nondot.org> Instead of making callers of ExpandLibCall legalize the result, make
ExpandLibCall do it itself.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25731 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0e8ea71a4f45b070aecfe9a896bbe402c8b175d6 28-Jan-2006 Chris Lattner <sabre@nondot.org> Eliminate the need to do another iteration of the legalizer after inserting
a libcall.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0aed7840ec8cc85f91b4aa6e69318bba0cbd1f03 28-Jan-2006 Nate Begeman <natebegeman@mac.com> Implement Promote for VAARG, and allow it to be custom promoted for people
who don't want the default behavior (Alpha).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0ff5c27a00926e2ea4c99b3d5e62c55b29faf06b 28-Jan-2006 Chris Lattner <sabre@nondot.org> Remove the ISD::CALL and ISD::TAILCALL nodes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ce7518ce92f45568dc7d4cbb863284afb962fec5 26-Jan-2006 Chris Lattner <sabre@nondot.org> initial selectiondag support for new INLINEASM node. Note that inline asms
with outputs or inputs are not supported yet. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25664 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
acc398c195a697795bff3245943d104eb19192b9 25-Jan-2006 Nate Begeman <natebegeman@mac.com> First part of bug 680:
Remove TLI.LowerVA* and replace it with SDNodes that are lowered the same
way as everything else.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25606 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6a5428934ba6159c1acc541944332e51a6cfa59a 24-Jan-2006 Chris Lattner <sabre@nondot.org> Fix an infinite loop I caused by making sure to legalize the flag operand
of CALLSEQ_* nodes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25582 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
67993f7b974cd17e4372a6b7b9f9cad5ed174df1 23-Jan-2006 Chris Lattner <sabre@nondot.org> Fix Regression/CodeGen/SparcV8/2006-01-22-BitConvertLegalize.ll by making
sure that the result of expanding a BIT_CONVERT node is itself legalized.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
348e93c8f7132c6ecbaf5866048e087feb7520e2 21-Jan-2006 Chris Lattner <sabre@nondot.org> Fix CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25496 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a68d204843fc8b9606e7760fcddd20b99e8e340d 20-Jan-2006 Chris Lattner <sabre@nondot.org> remove some unintentionally committed code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25483 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4eebb60f843e0aa67b62f3b8643101bc0e39531d 20-Jan-2006 Chris Lattner <sabre@nondot.org> If the target doesn't support f32 natively, insert the FP_EXTEND in target-indep
code, so that the LowerReturn code doesn't have to handle it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
12f2274ba8c6af21e8b6c71ef872afe43a64b6d7 19-Jan-2006 Evan Cheng <evan.cheng@apple.com> Another typo


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8ff318b7fb6185e94403c0a902f1132141847ac5 19-Jan-2006 Andrew Lenharth <andrewl@lenharth.org> was ignoring the legalized chain in this case, fixed SPASS on alpha


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
433f8acefb78f1c8a2cf79c12b101ce7c4b20202 17-Jan-2006 Evan Cheng <evan.cheng@apple.com> Bug fix: missing LegalizeOp() on newly created nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25401 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
063e765345fd49df0f53b807e57ada7c2ded7e16 17-Jan-2006 Jim Laskey <jlaskey@mac.com> Adding basic support for Dwarf line number debug information.

I promise to keep future commits smaller.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c02d98e335703d8aa51b42d9b22a1fa2ac5d6c33 16-Jan-2006 Nate Begeman <natebegeman@mac.com> Expand case for 64b Legalize, even though no one should end up using this
(itanium supports bswap natively, alpha should custom lower it using the
VAX floating point swapload, ha ha).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
903d278a9b7398d8905c90832e587e0556c52789 15-Jan-2006 Chris Lattner <sabre@nondot.org> Allow the target to specify 'expand' if they just require the amount to
be subtracted from the stack pointer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5f652295c27826f26547cf5eb4096a59d86b56b8 15-Jan-2006 Chris Lattner <sabre@nondot.org> Fix custom lowering of dynamic_stackalloc


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25329 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c0ab5226cc92b8d33104374a21896b8331f3fee1 14-Jan-2006 Chris Lattner <sabre@nondot.org> Token chain results are not always the first or last result. Consider copyfromreg nodes, where they are the middle result (the flag result is last)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25325 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d88fc03602947b5baa35c8b09fe8bcfa2b4a03c1 14-Jan-2006 Nate Begeman <natebegeman@mac.com> bswap implementation


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25312 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4f0d8e4018d50c5796660a4fa167763f46259646 13-Jan-2006 Chris Lattner <sabre@nondot.org> If a target specified a stack pointer with setStackPointerRegisterToSaveRestore,
lower STACKSAVE/STACKRESTORE into a copy from/to that register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25276 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
140d53c99c3a70b9d3858a3c87f8ecb098994748 13-Jan-2006 Chris Lattner <sabre@nondot.org> Compile llvm.stacksave/restore into STACKSAVE/STACKRESTORE nodes, and allow
targets to custom expand them as they desire.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a7dce3c6c29fb9513d215c1bc44b01865571b4c2 11-Jan-2006 Evan Cheng <evan.cheng@apple.com> Allow custom lowering of DYNAMIC_STACKALLOC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
35ef913ec21de0f4f1b39c811b4335438717a9b8 11-Jan-2006 Nate Begeman <natebegeman@mac.com> Add bswap, rotl, and rotr nodes
Add dag combiner code to recognize rotl, rotr
Add ppc code to match rotl

Targets should add rotl/rotr patterns if they have them


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25222 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
269f8c069105e13f3845a8dbc7796ac9a15dc882 10-Jan-2006 Chris Lattner <sabre@nondot.org> silence a warning


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
de387ce81024f9be0ca523e9487b1aafeb95fa22 10-Jan-2006 Chris Lattner <sabre@nondot.org> Fix an exponential function in libcall insertion to not be exponential. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
05a2d568c60b8d547a5ac78f99107c476e6612b5 09-Jan-2006 Evan Cheng <evan.cheng@apple.com> * Allow custom lowering of ADD_PARTS, SUB_PARTS, SHL_PARTS, SRA_PARTS,
and SRL_PARTS.
* Fix a bug that caused *_PARTS to be custom lowered twice.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25157 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
47f5beaaaf41ffa2db51da6f99314474be6aca7d 06-Jan-2006 Chris Lattner <sabre@nondot.org> Unbreak the build :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25124 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
17c428e23dbeac1f985d725905ce6be1c725491f 06-Jan-2006 Evan Cheng <evan.cheng@apple.com> Support for custom lowering of ISD::RET.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25116 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
abf6d1784b2d4bbcb7d20ab64881f77d755059f6 05-Jan-2006 Jim Laskey <jlaskey@mac.com> Added initial support for DEBUG_LABEL allowing debug specific labels to be
inserted in the code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b2efb853f00d45b1c8d57f92acd0028fbdeffda6 04-Jan-2006 Jim Laskey <jlaskey@mac.com> Applied some recommend changes from sabre. The dominate one beginning "let the
pass manager do it's thing." Fixes crash when compiling -g files and suppresses
dwarf statements if no debug info is present.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5bf6f25b4a888afaf3e37acd18c43186d45cac2e 04-Jan-2006 Jim Laskey <jlaskey@mac.com> Add unique id to debug location for debug label use (work in progress.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25096 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7ca9ab3f5c1e9f2b1d4ded2389373ec672da217a 04-Jan-2006 Jim Laskey <jlaskey@mac.com> Change how MachineDebugInfo is fetched.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25089 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
57030e36e41ebd982a24632e7cea5b584b2d49fc 25-Dec-2005 Andrew Lenharth <andrewl@lenharth.org> allow custom lowering to return null for legal results


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25007 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e8f65f1e62ea1d4f2ca9fd0137ae2e0ce20e26e1 25-Dec-2005 Andrew Lenharth <andrewl@lenharth.org> Support Custom lowering of a few more operations.
Alpha needs to custom lower *DIV and *REM


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c26f7a033f5416f216ef08929cbc8cb8df509ef3 23-Dec-2005 Chris Lattner <sabre@nondot.org> unbreak the build :-/


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f3fd9fe20dbcb40f3dffc1518ab955a0b5d6fa23 23-Dec-2005 Evan Cheng <evan.cheng@apple.com> Allow custom lowering of LOAD, EXTLOAD, ZEXTLOAD, STORE, and TRUNCSTORE. Not
currently used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24988 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
232348d66fcfe8f42f8b14cfacd2df3d00d2596e 23-Dec-2005 Chris Lattner <sabre@nondot.org> Fix a pasto


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ed7b5babfbdc708c564266052ad3b0ce0a5726c5 23-Dec-2005 Chris Lattner <sabre@nondot.org> fix a thinko in the bit_convert handling code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24972 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
35481892da1e5634bf497c8a0cabb1bb5a8b8fef 23-Dec-2005 Chris Lattner <sabre@nondot.org> add very simple support for the BIT_CONVERT node


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24970 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0fcd40f501d99ce50b23f67e578a37f0943dec36 22-Dec-2005 Chris Lattner <sabre@nondot.org> remove dead code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24965 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1ccf26a6392034a11827aeaa0d58d025ecb2b85a 22-Dec-2005 Chris Lattner <sabre@nondot.org> The 81st column doesn't like code in it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e81aecbae69d4b3bd24523ec87673632d3b0beec 21-Dec-2005 Jim Laskey <jlaskey@mac.com> Disengage DEBUG_LOC from non-PPC targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d5781fca4f8f98863560338d4f8d017389428119 21-Dec-2005 Evan Cheng <evan.cheng@apple.com> * Added support for X86 RET with an additional operand to specify number of
bytes to pop off stack.
* Added support for X86 SETCC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24917 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f9dee6a0473db4f3713bf40c7408fa30578ac141 21-Dec-2005 Chris Lattner <sabre@nondot.org> make sure to relegalize all cases


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24911 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
83397363348662e9352455ea1e6e88e7026300a4 21-Dec-2005 Chris Lattner <sabre@nondot.org> fix a bug I introduced that broke recursive expansion of nodes (e.g. scalarizing vectors)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24905 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
69a889eb35d59a10e78a07cc26d41cbab31eddce 20-Dec-2005 Chris Lattner <sabre@nondot.org> Fix a nasty latent bug in the legalizer that was triggered by my patch
last night, breaking crafty and twolf. Make sure that the newly found
legal nodes are themselves not re-legalized until the next iteration.

Also, since this functionality exists now, we can reduce number of legalizer
iterations by depending on this behavior instead of having to misuse 'do
another iteration' to get the same effect.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
898101c15fa11a896deb4e2fcb73b4727e1dcc1f 20-Dec-2005 Evan Cheng <evan.cheng@apple.com> X86 conditional branch support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e773673d8e0094bbff2f9ab2f2da9ecb5c4d0909 19-Dec-2005 Chris Lattner <sabre@nondot.org> Make sure to relegalize new nodes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f1a47c3371ecd5bb449f39736a36ebbebd4e9e14 18-Dec-2005 Chris Lattner <sabre@nondot.org> More corrections for flagged copyto/from reg


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7310fb11f2a074069bf9ec3fc169c742ac48d32b 18-Dec-2005 Chris Lattner <sabre@nondot.org> legalize copytoreg and copyfromreg nodes that have flag operands correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
181b7a382fbdd3d03ce373a6ffac2204e763f9c3 18-Dec-2005 Chris Lattner <sabre@nondot.org> allow custom expansion of BR_CC


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24804 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7df96d66729d1f33934de7b52553e5f071686041 17-Dec-2005 Evan Cheng <evan.cheng@apple.com> X86 lowers SELECT to a cmp / test followed by a conditional move.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24754 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f5395cee6a24699a016b2e379cf4804b09ce5030 16-Dec-2005 Jim Laskey <jlaskey@mac.com> Added source file/line correspondence for dwarf (PowerPC only at this point.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d7d746f60337684310fcd985d4466edd6a5980ac 13-Dec-2005 Nate Begeman <natebegeman@mac.com> Lowering constant pool entries on ppc exposed a bug in the recently added
ConstantVec legalizing code, which would return constantpool nodes that
were not of the target's pointer type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24691 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
58f7963b8b3cb8894623a7d7663cc54005fea8f9 12-Dec-2005 Chris Lattner <sabre@nondot.org> Fix CodeGen/Generic/2005-12-12-ExpandSextInreg.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
28a6b02626c29b1fe9bb16c14c193549fab4cab8 10-Dec-2005 Nate Begeman <natebegeman@mac.com> Add support for TargetConstantPool nodes to the dag isel emitter, and use
them in the PPC backend, to simplify some logic out of Select and
SelectAddr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5e3c5b4e13d45d631cddf42176b380f64fde918f 09-Dec-2005 Chris Lattner <sabre@nondot.org> Teach legalize how to promote sext_inreg to fix a problem Andrew pointed
out to me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
cc827e60b67b2cbcf08a37b119e68081e4171b8a 07-Dec-2005 Nate Begeman <natebegeman@mac.com> Fix a crash where ConstantVec nodes were being generated with the wrong
type when the target did not support them. Also teach Legalize how to
expand ConstantVecs.

This allows us to generate

_test:
lwz r2, 12(r3)
lwz r4, 8(r3)
lwz r5, 4(r3)
lwz r6, 0(r3)
addi r2, r2, 4
addi r4, r4, 3
addi r5, r5, 2
addi r6, r6, 1
stw r2, 12(r3)
stw r4, 8(r3)
stw r5, 4(r3)
stw r6, 0(r3)
blr

For:

void %test(%v4i *%P) {
%T = load %v4i* %P
%S = add %v4i %T, <int 1, int 2, int 3, int 4>
store %v4i %S, %v4i * %P
ret void
}

On PowerPC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8cfa57b1b4eade4e0101195b2f94ab288cd03563 06-Dec-2005 Nate Begeman <natebegeman@mac.com> Teach the SelectionDAG ISel how to turn ConstantPacked values into
constant nodes with vector types. Also teach the asm printer how to print
ConstantPacked constant pool entries. This allows us to generate altivec
code such as the following, which adds a vector constantto a packed float.

LCPI1_0: <4 x float> < float 0.0e+0, float 0.0e+0, float 0.0e+0, float 1.0e+0 >
.space 4
.space 4
.space 4
.long 1065353216 ; float 1
.text
.align 4
.globl _foo
_foo:
lis r2, ha16(LCPI1_0)
la r2, lo16(LCPI1_0)(r2)
li r4, 0
lvx v0, r4, r2
lvx v1, r4, r3
vaddfp v0, v1, v0
stvx v0, r4, r3
blr

For the llvm code:

void %foo(<4 x float> * %a) {
entry:
%tmp1 = load <4 x float> * %a;
%tmp2 = add <4 x float> %tmp1, < float 0.0, float 0.0, float 0.0, float 1.0 >
store <4 x float> %tmp2, <4 x float> *%a
ret void
}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24616 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
cde0f5cfe7b7e0a73708c0db29dcfc0d00294e98 02-Dec-2005 Andrew Lenharth <andrewl@lenharth.org> bah, must generate all results


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24574 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
49c709f891a3e49db58b56ca94eafa98cbb12c4d 02-Dec-2005 Andrew Lenharth <andrewl@lenharth.org> cycle counter fix


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9ad17c9c9abfd6e011751d2fd2b03448e1dccb71 01-Dec-2005 Chris Lattner <sabre@nondot.org> Promote line and column number information for our friendly 64-bit targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ae35575957a3ab446e2766aa05d03020ced27d14 30-Nov-2005 Andrew Lenharth <andrewl@lenharth.org> At long last, you can say that f32 isn't supported for setcc


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5b5b8c27556e5dc8792e37436e4ddd7ab157192d 30-Nov-2005 Andrew Lenharth <andrewl@lenharth.org> add support for custom lowering SINT_TO_FP


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24531 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
36ce69195ed488034d0bb11180cc2ebd923679c8 29-Nov-2005 Chris Lattner <sabre@nondot.org> Add support for a new STRING and LOCATION node for line number support, patch
contributed by Daniel Berlin, with a few cleanups here and there by me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6a648614e88586e85a36ceb5c1d3b84e4f55b458 29-Nov-2005 Nate Begeman <natebegeman@mac.com> Add the majority of the vector machien value types we expect to support,
and make a few changes to the legalization machinery to support more than
16 types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24511 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ab48be377298bd509427a29e174cf4e305138819 22-Nov-2005 Nate Begeman <natebegeman@mac.com> Check in code to scalarize arbitrarily wide packed types for some simple
vector operations (load, add, sub, mul).

This allows us to codegen:
void %foo(<4 x float> * %a) {
entry:
%tmp1 = load <4 x float> * %a;
%tmp2 = add <4 x float> %tmp1, %tmp1
store <4 x float> %tmp2, <4 x float> *%a
ret void
}

on ppc as:
_foo:
lfs f0, 12(r3)
lfs f1, 8(r3)
lfs f2, 4(r3)
lfs f3, 0(r3)
fadds f0, f0, f0
fadds f1, f1, f1
fadds f2, f2, f2
fadds f3, f3, f3
stfs f0, 12(r3)
stfs f1, 8(r3)
stfs f2, 4(r3)
stfs f3, 0(r3)
blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24484 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4ef3b817fee7ea5be7219e00ab8e15976bfe279f 22-Nov-2005 Nate Begeman <natebegeman@mac.com> Rather than attempting to legalize 1 x float, make sure the SD ISel never
generates it. Make MVT::Vector expand-only, and remove the code in
Legalize that attempts to legalize it.

The plan for supporting N x Type is to continually epxand it in ExpandOp
until it gets down to 2 x Type, where it will be scalarized into a pair of
scalars.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
308575be66ec3870d27b19df044fda18448feb41 20-Nov-2005 Chris Lattner <sabre@nondot.org> Legalize MERGE_VALUES, expand READCYCLECOUNTER correctly, so it doesn't
break control dependence.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f70e30b41dc6a92733681dcea2c06d8b3dd488db 20-Nov-2005 Andrew Lenharth <andrewl@lenharth.org> The first patch of X86 support for read cycle counter


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24429 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b89175feffa7148c05d1d30a8e382b8d321edae5 19-Nov-2005 Chris Lattner <sabre@nondot.org> Silence a bogus warning


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24420 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5fbb5d2459a5410590f285250faa604576308a93 19-Nov-2005 Nate Begeman <natebegeman@mac.com> Teach LLVM how to scalarize packed types. Currently, this only works on
packed types with an element count of 1, although more generic support is
coming. This allows LLVM to turn the following code:

void %foo(<1 x float> * %a) {
entry:
%tmp1 = load <1 x float> * %a;
%tmp2 = add <1 x float> %tmp1, %tmp1
store <1 x float> %tmp2, <1 x float> *%a
ret void
}

Into:

_foo:
lfs f0, 0(r3)
fadds f0, f0, f0
stfs f0, 0(r3)
blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24416 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0c8fbe33a4bdf7c60e0cfd5a9c86499c817d9f1a 17-Nov-2005 Chris Lattner <sabre@nondot.org> Allow targets to custom legalize leaf nodes like GlobalAddress.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24387 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b9debbf54c926036d5c22b3e7f0d12c79c1c15a3 17-Nov-2005 Chris Lattner <sabre@nondot.org> Teach legalize about targetglobaladdress


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
51b8d54922350b7e1c2cd5a5183ef2c5f5d1b1d5 11-Nov-2005 Andrew Lenharth <andrewl@lenharth.org> continued readcyclecounter support


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
de202b3cda00f17ba2c047be7270b51f9585a413 10-Nov-2005 Chris Lattner <sabre@nondot.org> Switch the allnodes list from a vector of pointers to an ilist of nodes.This eliminates the vector, allows constant time removal of a node froma graph, and makes iteration over the all nodes list stable when adding
nodes to the graph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
040c11c24e9f6c172eaf680e135d9bb466c284b2 09-Nov-2005 Chris Lattner <sabre@nondot.org> Handle the trivial (but common) two-op case more efficiently


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0d902a9c740bdaa57396547f26a02c234752c579 09-Nov-2005 Chris Lattner <sabre@nondot.org> Allocate the right amount of memory for this vector up front.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24252 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b7f6ef12f682c7068ca7513e088177a0d1046b35 26-Oct-2005 Nate Begeman <natebegeman@mac.com> Allow custom lowered FP_TO_SINT ops in the check for whether a larger
FP_TO_SINT is preferred to a larger FP_TO_UINT. This seems to be begging
for a TLI.isOperationCustom() helper function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5dc897b0e4e5eb4513adc2f161412ce23f6bf2e0 19-Oct-2005 Nate Begeman <natebegeman@mac.com> Teach Legalize how to do something with EXTRACT_ELEMENT when the type of
the pair of elements is a legal type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23804 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
419f8b62f73541dd783aa98c9eda6e483a487d51 18-Oct-2005 Nate Begeman <natebegeman@mac.com> Legalize BUILD_PAIR appropriately for upcoming 64 bit PowerPC work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8136cdae60eaa30cea91f288f25564a417b19a84 15-Oct-2005 Chris Lattner <sabre@nondot.org> Use getExtLoad here instead of getNode, as extloads produce two values. This
fixes a legalize failure on SPASS for itanium.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5054f162127f19ad43bc4d0b8ab232f0fee32953 14-Oct-2005 Nate Begeman <natebegeman@mac.com> Relax the checking on zextload generation a bit, since as sabre pointed out
you could be AND'ing with the result of a shift that shifts out all the
bits you care about, in addition to a constant.

Also, move over an add/sub_parts fold from legalize to the dag combiner,
where it works for things other than constants. Woot!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23720 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9ad8481cfbbb9dfe451b771978098677bc8dd254 13-Oct-2005 Chris Lattner <sabre@nondot.org> When ExpandOp'ing a [SZ]EXTLOAD, make sure to remember that the chain
is also legal. Add support for ExpandOp'ing raw EXTLOADs too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23716 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4c8f8f0481b26818d7810a6a585e7ecf52973e93 13-Oct-2005 Chris Lattner <sabre@nondot.org> Implement PromoteOp for *EXTLOAD, allowing MallocBench/gs to Legalize


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23715 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
144ff660e66845a575586bc4092c0cf349b5bfb9 13-Oct-2005 Nate Begeman <natebegeman@mac.com> Add support to Legalize for expanding i64 sextload/zextload into hi and lo
parts. This should fix the crafty and signed long long unit test failure
on x86 last night.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23711 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ded4963ab98c424a8e83f4dc0e63203754ca353b 13-Oct-2005 Nate Begeman <natebegeman@mac.com> Move some Legalize functionality over to the DAGCombiner where it belongs.
Kill some dead code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23706 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
cf5c79b34fcffdf7f0de72bc693ddcd3e2ec47a6 06-Oct-2005 Chris Lattner <sabre@nondot.org> silence a bogus GCC warning


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23646 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
32fca00a23a9872c31999d054b4dd7c724276d9d 06-Oct-2005 Chris Lattner <sabre@nondot.org> Make the legalizer completely non-recursive


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
829cb818065673a50101435f3c25e50ca82a02bf 05-Oct-2005 Nate Begeman <natebegeman@mac.com> Remove some bad code from Legalize


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1aa1972c63fb6b940b11250f7c12bcb368026014 04-Oct-2005 Nate Begeman <natebegeman@mac.com> Fix some faulty logic in the libcall inserter.

Since calls return more than one value, don't bail if one of their uses
happens to be a node that's not an MVT::Other when following the chain
from CALLSEQ_START to CALLSEQ_END.

Once we've found a CALLSEQ_START, we can just return; there's no need to
tail-recurse further up the graph.

Most importantly, just because something only has one use doesn't mean we
should use it's one use to follow from start to end. This faulty logic
caused us to follow a chain of one-use FP operations back to a much earlier
call, putting a cycle in the graph from a later start to an earlier end.

This is a better fix that reverting to the workaround committed earlier
today.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
27d404ccd1e86b7fffaf8037bf6b6dfb0b9d683b 04-Oct-2005 Nate Begeman <natebegeman@mac.com> Add back a workaround that fixes some breakages from chris's last change.
Neither of us have yet figured out why this code is necessary, but stuff
breaks if its not there. Still tracking this down...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23617 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ab510a76d6fed412f2dbbb29b3e123eef34f9c0a 02-Oct-2005 Chris Lattner <sabre@nondot.org> Fix a problem where the legalizer would run out of stack space on extremely
large basic blocks because it was purely recursive. This switches it to an
iterative/recursive hybrid.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
473a99073cc29f59809a0d5dfee11f5e9e6ad2b7 29-Sep-2005 Chris Lattner <sabre@nondot.org> Fix two bugs in my patch earlier today that broke int->fp conversion on X86.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
01b3d73c20f5afb8265ae943a8ba23c2238c5eea 29-Sep-2005 Chris Lattner <sabre@nondot.org> Add FP versions of the binary operators, keeping the int and fp worlds seperate.

Though I have done extensive testing, it is possible that this will break
things in configs I can't test. Please let me know if this causes a problem
and I'll fix it ASAP.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
13d58e71b7ab2857162b88860c56dce4c9cea3de 10-Sep-2005 Chris Lattner <sabre@nondot.org> Allow targets to say they don't support truncstore i1 (which includes a mask
when storing to an 8-bit memory location), as most don't.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23303 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6fdcb250d5692235813b30274cdfcd0e76377f00 02-Sep-2005 Chris Lattner <sabre@nondot.org> Clean up some code from the last checkin


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23229 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
99c25b86aa85b0093f24b2394a5aa37f66294b2b 02-Sep-2005 Chris Lattner <sabre@nondot.org> Fix a bug in legalize where it would emit two calls to libcalls that return
i64 values on targets that need that expanded to 32-bit registers. This fixes
PowerPC/2005-09-02-LegalizeDuplicatesCalls.ll and speeds up 189.lucas from
taking 122.72s to 81.96s on my desktop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
08951a32fbc1de3ec3746e14109a74ca506ca251 02-Sep-2005 Chris Lattner <sabre@nondot.org> Make sure to legalize assert[zs]ext's operand correctly


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23208 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
13c78e2e5f158e9008b279b43b685ff02bb3cbea 02-Sep-2005 Chris Lattner <sabre@nondot.org> legalize ANY_EXTEND appropriately


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23204 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
50ec8979047065bd0ff41fac4ffd44f744b77723 31-Aug-2005 Chris Lattner <sabre@nondot.org> Allow targets to custom expand shifts that are too large for their registers


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23173 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
cc0675a4be9a5133abd48ee272ff999ae48feabf 30-Aug-2005 Chris Lattner <sabre@nondot.org> Fix FreeBench/fourinarow with the dag isel, by not adding a bogus result
to SHIFT_PARTS nodes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23151 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ec176e30d655f96d75b49e620a849008bf0f63a2 30-Aug-2005 Chris Lattner <sabre@nondot.org> Fix a miscompile of PtrDist/bc. Sign extending bools is not the right thing,
at least tends to expose problems elsewhere.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
56eb86806d5d178d42108f17d11098b3e640b996 30-Aug-2005 Nate Begeman <natebegeman@mac.com> Add support for AssertSext and AssertZext, folding other extensions with
them. This allows for elminination of redundant extends in the entry
blocks of functions on PowerPC.

Add support for i32 x i32 -> i64 multiplies, by recognizing when the inputs
to ISD::MUL in ExpandOp are actually just extended i32 values and not real
i64 values. this allows us to codegen

int mulhs(int a, int b) { return ((long long)a * b) >> 32; }
as:
_mulhs:
mulhw r3, r4, r3
blr

instead of:
_mulhs:
mulhwu r2, r4, r3
srawi r5, r3, 31
mullw r5, r4, r5
add r2, r2, r5
srawi r4, r4, 31
mullw r3, r4, r3
add r3, r2, r3
blr

with a similar improvement on x86.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5e3efbc2ca459621400211f7370d7f121d4827d9 29-Aug-2005 Andrew Lenharth <andrewl@lenharth.org> Some of us cared about the the promote path


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
507f752f6ed28aa9f0ae680e95bfc93df4e9e2dc 29-Aug-2005 Chris Lattner <sabre@nondot.org> Fix an infinite loop on x86


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23129 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
eb150d7d1fe0a7c63a9008798324a284bbcb9ce9 27-Aug-2005 Chris Lattner <sabre@nondot.org> Nate noticed that Andrew never did this. This fixes PR600


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23110 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5839bf2b3bd22689d9dd0e9de66c2dce71d130ae 26-Aug-2005 Chris Lattner <sabre@nondot.org> Change ConstantPoolSDNode to actually hold the Constant itself instead of
putting it into the constant pool. This allows the isel machinery to
create constants that it will end up deciding are not needed, without them
ending up in the resultant function constant pool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d7050a9c50211dd215cb3c2bc28b4fb6bfa4a116 26-Aug-2005 Chris Lattner <sabre@nondot.org> the 5th operand is the 4th number


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
23004e5f21716671401e95e3be91d87dc7d4d68b 26-Aug-2005 Chris Lattner <sabre@nondot.org> Add support for targets that want to custom expand select_cc in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
07dffd6af673c73352150583150b242a93694f00 26-Aug-2005 Chris Lattner <sabre@nondot.org> Allow LowerOperation to return a null SDOperand in case it wants to lower
some things given to it, but not all.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23070 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c9c60f6429416d362c2131b14d097ce0a9ac9599 24-Aug-2005 Chris Lattner <sabre@nondot.org> Start using isOperationLegal and isTypeLegal to simplify the code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b942a3dd5f9318b2c57f137d2991440c2f0262ad 23-Aug-2005 Nate Begeman <natebegeman@mac.com> Teach Legalize how to turn setcc into select_cc


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
550b1e59c4eb5db020766012b1406fc56833251d 21-Aug-2005 Chris Lattner <sabre@nondot.org> When legalizing brcond ->brcc or select -> selectcc, make sure to truncate
the old condition to a one bit value. The incoming value must have been
promoted, and the top bits are undefined. This causes us to generate:

_test:
rlwinm r2, r3, 0, 31, 31
li r3, 17
cmpwi cr0, r2, 0
bne .LBB_test_2 ;
.LBB_test_1: ;
li r3, 1
.LBB_test_2: ;
blr

instead of:

_test:
rlwinm r2, r3, 0, 31, 31
li r2, 17
cmpwi cr0, r3, 0
bne .LBB_test_2 ;
.LBB_test_1: ;
li r2, 1
.LBB_test_2: ;
or r3, r2, r2
blr

for:

int %test(bool %c) {
%retval = select bool %c, int 17, int 1
ret int %retval
}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22947 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
cb6682fa44e13262bdef7dd22b4ba90f8c2e7b97 17-Aug-2005 Jim Laskey <jlaskey@mac.com> Culling out use of unions for converting FP to bits and vice versa.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
02659d23637f69f90640bfa3e66919517103c57a 17-Aug-2005 Jim Laskey <jlaskey@mac.com> Switched to using BitsToDouble for int_to_float to avoid aliasing problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
491dfa88e48ac48b1dae0adf89d2ff77c828c735 17-Aug-2005 Jim Laskey <jlaskey@mac.com> Change hex float constants for the sake of VC++.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6269ed125fc492d81dc5e3f48482816fc9d47f49 17-Aug-2005 Jim Laskey <jlaskey@mac.com> Added generic code expansion for [signed|unsigned] i32 to [f32|f64] casts in the
legalizer. PowerPC now uses this expansion instead of ISel version.

Example:

// signed integer to double conversion
double f1(signed x) {
return (double)x;
}

// unsigned integer to double conversion
double f2(unsigned x) {
return (double)x;
}

// signed integer to float conversion
float f3(signed x) {
return (float)x;
}

// unsigned integer to float conversion
float f4(unsigned x) {
return (float)x;
}


Byte Code:

internal fastcc double %_Z2f1i(int %x) {
entry:
%tmp.1 = cast int %x to double ; <double> [#uses=1]
ret double %tmp.1
}

internal fastcc double %_Z2f2j(uint %x) {
entry:
%tmp.1 = cast uint %x to double ; <double> [#uses=1]
ret double %tmp.1
}

internal fastcc float %_Z2f3i(int %x) {
entry:
%tmp.1 = cast int %x to float ; <float> [#uses=1]
ret float %tmp.1
}

internal fastcc float %_Z2f4j(uint %x) {
entry:
%tmp.1 = cast uint %x to float ; <float> [#uses=1]
ret float %tmp.1
}

internal fastcc double %_Z2g1i(int %x) {
entry:
%buffer = alloca [2 x uint] ; <[2 x uint]*> [#uses=3]
%tmp.0 = getelementptr [2 x uint]* %buffer, int 0, int 0 ; <uint*> [#uses=1]
store uint 1127219200, uint* %tmp.0
%tmp.2 = cast int %x to uint ; <uint> [#uses=1]
%tmp.3 = xor uint %tmp.2, 2147483648 ; <uint> [#uses=1]
%tmp.5 = getelementptr [2 x uint]* %buffer, int 0, int 1 ; <uint*> [#uses=1]
store uint %tmp.3, uint* %tmp.5
%tmp.9 = cast [2 x uint]* %buffer to double* ; <double*> [#uses=1]
%tmp.10 = load double* %tmp.9 ; <double> [#uses=1]
%tmp.13 = load double* cast (long* %signed_bias to double*) ; <double> [#uses=1]
%tmp.14 = sub double %tmp.10, %tmp.13 ; <double> [#uses=1]
ret double %tmp.14
}

internal fastcc double %_Z2g2j(uint %x) {
entry:
%buffer = alloca [2 x uint] ; <[2 x uint]*> [#uses=3]
%tmp.0 = getelementptr [2 x uint]* %buffer, int 0, int 0 ; <uint*> [#uses=1]
store uint 1127219200, uint* %tmp.0
%tmp.1 = getelementptr [2 x uint]* %buffer, int 0, int 1 ; <uint*> [#uses=1]
store uint %x, uint* %tmp.1
%tmp.4 = cast [2 x uint]* %buffer to double* ; <double*> [#uses=1]
%tmp.5 = load double* %tmp.4 ; <double> [#uses=1]
%tmp.8 = load double* cast (long* %unsigned_bias to double*) ; <double> [#uses=1]
%tmp.9 = sub double %tmp.5, %tmp.8 ; <double> [#uses=1]
ret double %tmp.9
}

internal fastcc float %_Z2g3i(int %x) {
entry:
%buffer = alloca [2 x uint] ; <[2 x uint]*> [#uses=3]
%tmp.0 = getelementptr [2 x uint]* %buffer, int 0, int 0 ; <uint*> [#uses=1]
store uint 1127219200, uint* %tmp.0
%tmp.2 = cast int %x to uint ; <uint> [#uses=1]
%tmp.3 = xor uint %tmp.2, 2147483648 ; <uint> [#uses=1]
%tmp.5 = getelementptr [2 x uint]* %buffer, int 0, int 1 ; <uint*> [#uses=1]
store uint %tmp.3, uint* %tmp.5
%tmp.9 = cast [2 x uint]* %buffer to double* ; <double*> [#uses=1]
%tmp.10 = load double* %tmp.9 ; <double> [#uses=1]
%tmp.13 = load double* cast (long* %signed_bias to double*) ; <double> [#uses=1]
%tmp.14 = sub double %tmp.10, %tmp.13 ; <double> [#uses=1]
%tmp.16 = cast double %tmp.14 to float ; <float> [#uses=1]
ret float %tmp.16
}

internal fastcc float %_Z2g4j(uint %x) {
entry:
%buffer = alloca [2 x uint] ; <[2 x uint]*> [#uses=3]
%tmp.0 = getelementptr [2 x uint]* %buffer, int 0, int 0 ; <uint*> [#uses=1]
store uint 1127219200, uint* %tmp.0
%tmp.1 = getelementptr [2 x uint]* %buffer, int 0, int 1 ; <uint*> [#uses=1]
store uint %x, uint* %tmp.1
%tmp.4 = cast [2 x uint]* %buffer to double* ; <double*> [#uses=1]
%tmp.5 = load double* %tmp.4 ; <double> [#uses=1]
%tmp.8 = load double* cast (long* %unsigned_bias to double*) ; <double> [#uses=1]
%tmp.9 = sub double %tmp.5, %tmp.8 ; <double> [#uses=1]
%tmp.11 = cast double %tmp.9 to float ; <float> [#uses=1]
ret float %tmp.11
}


PowerPC Code:

.machine ppc970


.const
.align 2
.CPIl1__Z2f1i_0: ; float 0x4330000080000000
.long 1501560836 ; float 4.5036e+15
.text
.align 2
.globl l1__Z2f1i
l1__Z2f1i:
.LBBl1__Z2f1i_0: ; entry
xoris r2, r3, 32768
stw r2, -4(r1)
lis r2, 17200
stw r2, -8(r1)
lfd f0, -8(r1)
lis r2, ha16(.CPIl1__Z2f1i_0)
lfs f1, lo16(.CPIl1__Z2f1i_0)(r2)
fsub f1, f0, f1
blr


.const
.align 2
.CPIl2__Z2f2j_0: ; float 0x4330000000000000
.long 1501560832 ; float 4.5036e+15
.text
.align 2
.globl l2__Z2f2j
l2__Z2f2j:
.LBBl2__Z2f2j_0: ; entry
stw r3, -4(r1)
lis r2, 17200
stw r2, -8(r1)
lfd f0, -8(r1)
lis r2, ha16(.CPIl2__Z2f2j_0)
lfs f1, lo16(.CPIl2__Z2f2j_0)(r2)
fsub f1, f0, f1
blr


.const
.align 2
.CPIl3__Z2f3i_0: ; float 0x4330000080000000
.long 1501560836 ; float 4.5036e+15
.text
.align 2
.globl l3__Z2f3i
l3__Z2f3i:
.LBBl3__Z2f3i_0: ; entry
xoris r2, r3, 32768
stw r2, -4(r1)
lis r2, 17200
stw r2, -8(r1)
lfd f0, -8(r1)
lis r2, ha16(.CPIl3__Z2f3i_0)
lfs f1, lo16(.CPIl3__Z2f3i_0)(r2)
fsub f0, f0, f1
frsp f1, f0
blr


.const
.align 2
.CPIl4__Z2f4j_0: ; float 0x4330000000000000
.long 1501560832 ; float 4.5036e+15
.text
.align 2
.globl l4__Z2f4j
l4__Z2f4j:
.LBBl4__Z2f4j_0: ; entry
stw r3, -4(r1)
lis r2, 17200
stw r2, -8(r1)
lfd f0, -8(r1)
lis r2, ha16(.CPIl4__Z2f4j_0)
lfs f1, lo16(.CPIl4__Z2f4j_0)(r2)
fsub f0, f0, f1
frsp f1, f0
blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d5d0f9bd20d9df07d6b4d41b7e8ed6d33b6a649d 16-Aug-2005 Chris Lattner <sabre@nondot.org> Eliminate the RegSDNode class, which 3 nodes (CopyFromReg/CopyToReg/ImplicitDef)
used to tack a register number onto the node.

Instead of doing this, make a new node, RegisterSDNode, which is a leaf
containing a register number. These three operations just become normal
DAG nodes now, instead of requiring special handling.

Note that with this change, it is no longer correct to make illegal
CopyFromReg/CopyToReg nodes. The legalizer will not touch them, and this
is bad, so don't do it. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7cbd525ba85ebe440d15fa359ec940e404d14906 16-Aug-2005 Nate Begeman <natebegeman@mac.com> Implement BR_CC and BRTWOWAY_CC. This allows the removal of a rather nasty
fixme from the PowerPC backend. Emit slightly better code for legalizing
select_cc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
149c58ce0b94e64faf3c4ccdbf894061cf7d66e1 16-Aug-2005 Chris Lattner <sabre@nondot.org> Add some methods for dag->dag isel.
Split RemoveNodeFromCSEMaps out of DeleteNodesIfDead to do it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2d56e72f09337a1cab3ba199a9467c159296f3fa 14-Aug-2005 Nate Begeman <natebegeman@mac.com> Fix last night's PPC32 regressions by
1. Not selecting the false value of a select_cc in the false arm, which
isn't legal for nested selects.
2. Actually returning the node we created and Legalized in the FP_TO_UINT
Expander.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d2558e3e4af2930730e2314868afd09ba005e282 14-Aug-2005 Nate Begeman <natebegeman@mac.com> Teach the legalizer how to legalize FP_TO_UINT.
Teach the legalizer to promote FP_TO_UINT to FP_TO_SINT if the wider
FP_TO_UINT is also illegal. This allows us on PPC to codegen
unsigned short foo(float a) { return a; }

as:
_foo:
.LBB_foo_0: ; entry
fctiwz f0, f1
stfd f0, -8(r1)
lwz r2, -4(r1)
rlwinm r3, r2, 0, 16, 31
blr

instead of:
_foo:
.LBB_foo_0: ; entry
fctiwz f0, f1
stfd f0, -8(r1)
lwz r2, -4(r1)
lis r3, ha16(.CPI_foo_0)
lfs f0, lo16(.CPI_foo_0)(r3)
fcmpu cr0, f1, f0
blt .LBB_foo_2 ; entry
.LBB_foo_1: ; entry
fsubs f0, f1, f0
fctiwz f0, f0
stfd f0, -16(r1)
lwz r2, -12(r1)
xoris r2, r2, 32768
.LBB_foo_2: ; entry
rlwinm r3, r2, 0, 16, 31
blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e5d63829fd62d815a330c21ea316e6b4cf943562 11-Aug-2005 Nate Begeman <natebegeman@mac.com> Some SELECT_CC cleanups:
1. move assertions for node creation to getNode()
2. legalize the values returned in ExpandOp immediately
3. Move select_cc optimizations from SELECT's getNode() to SELECT_CC's,
allowing them to be cleaned up significantly.

This paves the way to pick up additional optimizations on SELECT_CC, such
as sum-of-absolute-differences.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22757 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9373a81e53ce5f9f2c06c4209b8b886605aece08 10-Aug-2005 Nate Begeman <natebegeman@mac.com> Add new node, SELECT_CC. This node is for targets that don't natively
implement SELECT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22755 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7cf7e3f33f25544d08492d47cc8a1cbba25dc8d7 09-Aug-2005 Chris Lattner <sabre@nondot.org> Eliminate the SetCCSDNode in favor of a CondCodeSDNode class. This pulls the
CC out of the SetCC operation, making SETCC a standard ternary operation and
CC's a standard DAG leaf. This will make it possible for other node to use
CC's as operands in the future...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
82299e70977500209c951404e354510feffb8efa 05-Aug-2005 Chris Lattner <sabre@nondot.org> Change FindEarliestCallSeqEnd (used by libcall insertion) to use a set to
avoid revisiting nodes more than once. This eliminates a source of
potentially exponential behavior. For a small function in 191.fma3d
(hexah_stress_divergence_), this speeds up isel from taking > 20mins to
taking 0.07s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22680 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2f4eca30d11d634ac2a26eed4d80f8bc9584a4b3 05-Aug-2005 Chris Lattner <sabre@nondot.org> Fix a latent bug in the libcall inserter that was exposed by Nate's patch
yesterday. This fixes whetstone and a bunch of programs in the External tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22678 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2ac4fc032050ff1e0f06bd8e27126e979406effb 04-Aug-2005 Nate Begeman <natebegeman@mac.com> Fix a fixme in LegalizeDAG


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22661 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4c64dd7977bc676399df0d5d2bf8016a3242780e 03-Aug-2005 Chris Lattner <sabre@nondot.org> Fix PR611, codegen'ing SREM of FP operands to fmod or fmodf instead of
the sequence used for integer ops


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e21c305ed85b2be4a27784ba52471f6b68fdd255 01-Aug-2005 Chris Lattner <sabre@nondot.org> Fix casts from long to sbyte on ppc


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22570 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d29b6aa608d69f19b57ebd2ae630b040b1c4951d 30-Jul-2005 Jeff Cohen <jeffc@jolt-lang.org> Keep tabs and trailing spaces out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f20d183c2268553c738fefb014959ea924dd0555 30-Jul-2005 Chris Lattner <sabre@nondot.org> fix float->long conversions on x86


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22563 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f1fa74ee0d30dfdb854f7d3f5ee67437cc82e250 30-Jul-2005 Chris Lattner <sabre@nondot.org> Allow targets to have custom expanders for FP_TO_*INT conversions where
both the src and dest values are legal


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22555 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
80a3e94653574c69ac805d9684a23a94ed3e4b5d 29-Jul-2005 Chris Lattner <sabre@nondot.org> Allow targets to define custom expanders for FP_TO_*INT


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1618bebcf6f9cd19c4e05de3bfffda28c246bb12 29-Jul-2005 Chris Lattner <sabre@nondot.org> allow a target to request that unknown FP_TO_*INT conversion be promoted to
a larger integer destination.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
fa9c801a6b42609dc2a934afb6535e3d51d61a3e 29-Jul-2005 Chris Lattner <sabre@nondot.org> instead of having all conversions be handled by one case value, and then have
subcases inside, break things out earlier.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22546 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
00b16889ab461b7ecef1c91ade101186b7f1fce2 27-Jul-2005 Jeff Cohen <jeffc@jolt-lang.org> Eliminate all remaining tabs and trailing spaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f4d32726e622c740b4befc803e604903eb1349df 18-Jul-2005 Chris Lattner <sabre@nondot.org> The assertion was wrong: the code only worked for i64. While we're at it,
expand the code to work for all integer datatypes. This should unbreak
alpha.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5a8441ea3fc145393d6274156bd05c4a006099ea 16-Jul-2005 Nate Begeman <natebegeman@mac.com> Teach the legalizer how to promote SINT_TO_FP to a wider SINT_TO_FP that
the target natively supports. This eliminates some special-case code from
the x86 backend and generates better code as well.

For an i8 to f64 conversion, before & after:

_x87 before:
subl $2, %esp
movb 6(%esp), %al
movsbw %al, %ax
movw %ax, (%esp)
filds (%esp)
addl $2, %esp
ret

_x87 after:
subl $2, %esp
movsbw 6(%esp), %ax
movw %ax, (%esp)
filds (%esp)
addl $2, %esp
ret

_sse before:
subl $12, %esp
movb 16(%esp), %al
movsbl %al, %eax
cvtsi2sd %eax, %xmm0
addl $12, %esp
ret

_sse after:
subl $12, %esp
movsbl 16(%esp), %eax
cvtsi2sd %eax, %xmm0
addl $12, %esp
ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
cad063f1a8ecda4fd556a733dc5eaa8a96acb80d 16-Jul-2005 Chris Lattner <sabre@nondot.org> Break the code for expanding UINT_TO_FP operations out into its own
SelectionDAGLegalize::ExpandLegalUINT_TO_FP method.

Add a new method, PromoteLegalUINT_TO_FP, which allows targets to request
that UINT_TO_FP operations be promoted to a larger input type. This is
useful for targets that have some UINT_TO_FP or SINT_TO_FP operations but
not all of them (like X86).

The same should be done with SINT_TO_FP, but this patch does not do that
yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c087a435109cdc943da094a21371f7d66d5b0e54 13-Jul-2005 Chris Lattner <sabre@nondot.org> Fix Alpha/2005-07-12-TwoMallocCalls.ll and PR593.

It is not safe to call LegalizeOp on something that has already been legalized.
Instead, just force another iteration of legalization.

This could affect all platforms but X86, as this codepath is dynamically
dead on X86 (ISD::MEMSET and friends are legal).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6814f1522dd7cdeb4674a9ad199f482a2e7aaea1 13-Jul-2005 Chris Lattner <sabre@nondot.org> Fix test/Regression/CodeGen/Generic/2005-07-12-memcpy-i64-length.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22417 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5f056bf4b862a7c31388a68711dd3b3ed5de2be8 10-Jul-2005 Chris Lattner <sabre@nondot.org> Change *EXTLOAD to use an VTSDNode operand instead of being an MVTSDNode.
This is the last MVTSDNode.

This allows us to eliminate a bunch of special case code for handling
MVTSDNodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9fadb4c1c0a6d223aa468f9f72f8c2562dc66839 10-Jul-2005 Chris Lattner <sabre@nondot.org> Change TRUNCSTORE to use a VTSDNode operand instead of being an MVTSTDNode


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
15e4b01920d6a0ffbe35d3e5aa88a4b42970b6a7 10-Jul-2005 Chris Lattner <sabre@nondot.org> Introduce a new VTSDNode class with the ultimate goal of eliminating the
MVTSDNode class. This class is used to provide an operand to operators
that require an extra type. We start by converting FP_ROUND_INREG and
SIGN_EXTEND_INREG over to using it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f2eb1396b8fe7b5b1c4bd5f27903209cfa4d20ae 05-Jul-2005 Andrew Lenharth <andrewl@lenharth.org> 2 fixes:

1: Legalize operand in UINT_TO_FP expanision

2: SRA x, const i8 was not promoting the constant to shift amount type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22337 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c6bead211b608c51270e821f28bb50eed71be6c9 02-Jul-2005 Andrew Lenharth <andrewl@lenharth.org> I really didn't think this was necessary. But, Legalize wasn't running again
and legalizing the extload. Strange. Should fix most alpha regressions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22329 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
31559081a4285f4b7282e765aea4ec8a8e1d396c 30-Jun-2005 Andrew Lenharth <andrewl@lenharth.org> oops


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22320 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9d416f713e8b9e4f0c0c2b3f6f57ce2dd8993209 30-Jun-2005 Andrew Lenharth <andrewl@lenharth.org> FP EXTLOAD is not support on all archs, expand to LOAD and FP_EXTEND


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f4b3278aeba23efbeacf6be5c33273e2945be2f2 28-Jun-2005 Andrew Lenharth <andrewl@lenharth.org> Adapt the code for handling uint -> fp conversion for the 32 bit case to
handling it in the 64 bit case. The two code paths should probably be merged.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22302 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2789bde57f4245f4418a2d8d54e7f372b71f0a7d 14-May-2005 Chris Lattner <sabre@nondot.org> allow token chain at start or end of node


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3e01136f9fc2e1db9207d278002e76e6175783e9 14-May-2005 Chris Lattner <sabre@nondot.org> remove special case hacks for readport/readio from the binary operator
codepath


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22019 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
adf6c2a0cb638e8b211200b57b927d16f6e1cfc4 14-May-2005 Chris Lattner <sabre@nondot.org> Eliminate special purpose hacks for dynamic_stack_alloc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e89083a9300dc463e3b79eabe2b9913d85338d28 14-May-2005 Chris Lattner <sabre@nondot.org> Use the general mechanism for creating multi-value nodes instead of using
special case hacks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d73cc5d0585e86bf6d350ab9fd9caf85bdfc8b52 14-May-2005 Chris Lattner <sabre@nondot.org> legalize target-specific operations


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22010 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
50381b6c4180e9a2b983d4623da2e485cd768632 14-May-2005 Chris Lattner <sabre@nondot.org> LowerOperation takes a dag


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22004 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a88a260dbd874a3bdd3e47f4f15ab0d7c7803044 14-May-2005 Chris Lattner <sabre@nondot.org> Allow targets to have a custom int64->fp expander if desired


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
adf6a965a321372c640845407195594835921eb4 13-May-2005 Chris Lattner <sabre@nondot.org> Add an isTailCall flag to LowerCallTo


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d71c04199c447de39a2cab240c2fb7f717973e20 13-May-2005 Chris Lattner <sabre@nondot.org> Handle TAILCALL node


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
eb516e7f0aa3223eab7967f4c0f8132d82efd841 13-May-2005 Chris Lattner <sabre@nondot.org> Fix a problem that nate reduced for me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21923 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9530ddcc605cb65d0a19bbfbfb8b73b09c4e4cfa 13-May-2005 Chris Lattner <sabre@nondot.org> rename variables and functions to match renamed DAG nodes. Bonus feature:
I can actually remember which one is which now!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
66de05b606cf31f1f23ed0c4eb1f097738cd1506 13-May-2005 Chris Lattner <sabre@nondot.org> do not call expandop on the same value more than once. This fixes
X86/2004-02-22-Casts.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
128b52d3d75f4b74367de43e891cd98b5a9b5483 13-May-2005 Chris Lattner <sabre@nondot.org> update comment


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
16cd04d26c53c6f81313cafb85f6c0e7a07cdff6 13-May-2005 Chris Lattner <sabre@nondot.org> rename the ADJCALLSTACKDOWN/ADJCALLSTACKUP nodes to be CALLSEQ_START/BEGIN.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9092fa310c8b2b1645b0d448c4c34b1e8ddc131d 12-May-2005 Chris Lattner <sabre@nondot.org> Pass calling convention to use into lower call to


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3becf2026bec881a60cbbe0031d8c51f4d6d4e28 12-May-2005 Chris Lattner <sabre@nondot.org> fix expansion of ct[lt]z nodes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
39a8f336305a492fc6d2625f39f08968185616d2 12-May-2005 Chris Lattner <sabre@nondot.org> Expand 64-bit ctlz/cttz nodes for 32-bit targets


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
383203b0036b8fdeef8119975fdbbd528b760adb 12-May-2005 Chris Lattner <sabre@nondot.org> Fix uint->fp casts on PPC, allowing UnitTests/2005-05-12-Int64ToFP to
work on it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
45982dad53cd184fe8947a1b0206b0b16964f359 12-May-2005 Chris Lattner <sabre@nondot.org> Allow something to be legalized multiple times. This can be used to reduce
legalization iteration


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
13689e2009e71f7982d1313ed699e0e6a50157d0 12-May-2005 Chris Lattner <sabre@nondot.org> Oops, don't do this after we figure out where to insert the call chains.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
44d105b7faf5672a2af61a3f0fdfed0d437d5777 12-May-2005 Chris Lattner <sabre@nondot.org> Make sure to expand all nodes, avoiding unintentional node duplication.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e131e5b81e5853f3c2a8c63651898ecd37eaf6f8 12-May-2005 Chris Lattner <sabre@nondot.org> add fixme


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b9fa3bc8f39bf1e8df48b85eae4563032dd20bfc 12-May-2005 Chris Lattner <sabre@nondot.org> Fix a problem where early legalization can cause token chain problems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
88de6e77bfadea8962b017f372658204ab71448c 12-May-2005 Chris Lattner <sabre@nondot.org> Make legalize a bit more efficient, and canonicalize sub X, C -> add X, -C


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21882 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d7c4a4a6c048d4174b8795598f50fd76c30731ed 12-May-2005 Nate Begeman <natebegeman@mac.com> Necessary changes to codegen cttz efficiently on PowerPC
1. Teach LegalizeDAG how to better legalize CTTZ if the target doesn't have
CTPOP, but does have CTLZ
2. Teach PPC32 how to do sub x, const -> add x, -const for valid consts
3. Teach PPC32 how to do and (xor a, -1) b -> andc b, a
4. Teach PPC32 that ISD::CTLZ -> PPC::CNTLZW


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21880 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0d67f0c80f0295aa44f826ec1402ea73d6b4bd22 11-May-2005 Chris Lattner <sabre@nondot.org> Fix the last remaining bug preventing us from switching the X86 BE over
from the simple isel to the pattern isel. This forces inserted libcalls
to serialize against other function calls, which was breaking
UnitTests/2005-05-12-Int64ToFP. Hopefully this will fix issues on other
targets as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5c33c9a166c2d68d64c68d8097598d09d9af6c20 11-May-2005 Chris Lattner <sabre@nondot.org> Make sure to legalize generated ctpop nodes, convert tabs to spaces


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
57ff7e5f6479b43828406a6723b7dde6f673f48c 11-May-2005 Duraid Madina <duraid@octopus.com.au> expand count-leading/trailing-zeros; the test 2005-05-11-Popcount-ffs-fls.c
should now pass (the "LLVM" and "REF" results should be identical)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
18aa680a96c49cf9e28b52f5ab3f2c4f98793636 11-May-2005 Chris Lattner <sabre@nondot.org> Add some notes for expanding clz/ctz


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e3ef0a8b9f79d77116e888ffe51730c8279b7363 11-May-2005 Chris Lattner <sabre@nondot.org> Simplify this code, use the proper shift amount


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21861 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9b583b49103f21888ac3de3f7941a98a63a23aea 11-May-2005 Chris Lattner <sabre@nondot.org> Legalize this correctly


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21859 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
edb1add9a093efa266c94b6d0a34c26f5b2d5d7b 11-May-2005 Chris Lattner <sabre@nondot.org> implement expansion of ctpop nodes, implementing CodeGen/Generic/llvm-ct-intrinsics.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6d5b8e16462859333db9ad984f05ec2ed1f48f4a 09-May-2005 Chris Lattner <sabre@nondot.org> legalize readio/writeio into a load/store if requested


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
52d08bd9d8a8dcc06148525c7fad6f2ebcad0a42 09-May-2005 Chris Lattner <sabre@nondot.org> legalize READPORT, WRITEPORT, READIO, WRITEIO, at least in the basic cases
where they are directly supported by the architecture. Wrap a bunch of
long lines :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ded10bfb46aeacf02acec0018a0b970c1f932a32 05-May-2005 Andrew Lenharth <andrewl@lenharth.org> ctpop lowering in legalize


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
fecf095292991bdf9396fec474011446107f9813 04-May-2005 Andrew Lenharth <andrewl@lenharth.org> Make promoteOp work for CT*

Proof?

ubyte %bar(ubyte %x) {
entry:
%tmp.1 = call ubyte %llvm.ctlz( ubyte %x )
ret ubyte %tmp.1
}

==>

zapnot $16,1,$0
CTLZ $0,$0
subq $0,56,$0
zapnot $0,1,$0
ret $31,($26),1


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21691 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
691ef2ba066dda14ae4ac0ad645054fbc967785a 03-May-2005 Andrew Lenharth <andrewl@lenharth.org> Implement count leading zeros (ctlz), count trailing zeros (cttz), and count
population (ctpop). Generic lowering is implemented, however only promotion
is implemented for SelectionDAG at the moment.

More coming soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f76e7dc8d8ac1855ef59698e82c757548ef4ca65 30-Apr-2005 Chris Lattner <sabre@nondot.org> Codegen and legalize sin/cos/llvm.sqrt as FSIN/FCOS/FSQRT calls. This patch
was contributed by Morten Ofstad, with some minor tweaks and bug fixes added
by me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
da6ba87d234a934409e8d8d5b131b7341ab4bf97 28-Apr-2005 Chris Lattner <sabre@nondot.org> Legalize FSQRT, FSIN, FCOS nodes, patch contributed by Morten Ofstad


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21606 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2d86ea21dd76647cb054fd5d27df9e49efc672b6 27-Apr-2005 Andrew Lenharth <andrewl@lenharth.org> Implement Value* tracking for loads and stores in the selection DAG. This enables one to use alias analysis in the backends.

(TRUNK)Stores and (EXT|ZEXT|SEXT)Loads have an extra SDOperand which is a SrcValueSDNode which contains the Value*. Note that if the operation is introduced by the backend, it will still have the operand, but the value* will be null.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
edf128a7fa90f2b0b7ee24741a04a7ae1ecd6f7e 22-Apr-2005 Misha Brukman <brukman+llvm@gmail.com> Remove trailing whitespace


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21420 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e9c35e7309a8293852ba71d874fa4dc99e07e6fe 13-Apr-2005 Chris Lattner <sabre@nondot.org> Implement expansion of unsigned i64 -> FP.

Note that this probably only works for little endian targets, but is enough
to get siod working :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21280 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ffe284c65137ac1d8e4421550bdc9979ed80e9ee 13-Apr-2005 Chris Lattner <sabre@nondot.org> Make expansion of uint->fp cast assert out instead of infinitely recurse.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21275 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
23993561e24b2a6eaf0e036062522ab825c30d3f 13-Apr-2005 Chris Lattner <sabre@nondot.org> Instead of making ZERO_EXTEND_INREG nodes, use the helper method in
SelectionDAG to do the job with AND. Don't legalize Z_E_I anymore as
it is gone


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1c51c6ac13b5e68b099605021784c7f552dcce3c 12-Apr-2005 Chris Lattner <sabre@nondot.org> promote extload i1 -> extload i8


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21258 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5b95ed652fcfe578aa8af4e21318fca989164e21 12-Apr-2005 Chris Lattner <sabre@nondot.org> Emit comparisons against the sign bit better. Codegen this:

bool %test1(long %X) {
%A = setlt long %X, 0
ret bool %A
}

like this:

test1:
cmpl $0, 8(%esp)
setl %al
movzbl %al, %eax
ret

instead of:

test1:
movl 8(%esp), %ecx
cmpl $0, %ecx
setl %al
movzbw %al, %ax
cmpl $0, 4(%esp)
setb %dl
movzbw %dl, %dx
cmpl $0, %ecx
cmove %dx, %ax
movzbl %al, %eax
ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
08b698e38db5ab5db44c0472e2a7f4f780887629 12-Apr-2005 Chris Lattner <sabre@nondot.org> Emit long comparison against -1 better. Instead of this (x86):

test2:
movl 8(%esp), %eax
notl %eax
movl 4(%esp), %ecx
notl %ecx
orl %eax, %ecx
cmpl $0, %ecx
sete %al
movzbl %al, %eax
ret

or this (PPC):

_test2:
nor r2, r4, r4
nor r3, r3, r3
or r2, r2, r3
cntlzw r2, r2
srwi r3, r2, 5
blr

Emit this:

test2:
movl 8(%esp), %eax
andl 4(%esp), %eax
cmpl $-1, %eax
sete %al
movzbl %al, %eax
ret

or this:

_test2:
.LBB_test2_0: ;
and r2, r4, r3
cmpwi cr0, r2, -1
li r3, 1
li r2, 0
beq .LBB_test2_2 ;
.LBB_test2_1: ;
or r3, r2, r2
.LBB_test2_2: ;
blr

it seems like the PPC isel could do better for R32 == -1 case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
bd0781ed12dd817f760065e3ac2dcff12fb29440 11-Apr-2005 Chris Lattner <sabre@nondot.org> Teach the dag mechanism that this:

long long test2(unsigned A, unsigned B) {
return ((unsigned long long)A << 32) + B;
}

is equivalent to this:

long long test1(unsigned A, unsigned B) {
return ((unsigned long long)A << 32) | B;
}

Now they are both codegen'd to this on ppc:

_test2:
blr

or this on x86:

test2:
movl 4(%esp), %edx
movl 8(%esp), %eax
ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21231 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ee27f57a6a4dd7fa9259b3604f563907da1f65ef 11-Apr-2005 Chris Lattner <sabre@nondot.org> Fix expansion of shifts by exactly NVT bits on arch's (like X86) that have
masking shifts.

This fixes the miscompilation of this:

long long test1(unsigned A, unsigned B) {
return ((unsigned long long)A << 32) | B;
}

into this:

test1:
movl 4(%esp), %edx
movl %edx, %eax
orl 8(%esp), %eax
ret

allowing us to generate this instead:

test1:
movl 4(%esp), %edx
movl 8(%esp), %eax
ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c7c16575fea9aeffe8a63ddabe7c3c25f81ed799 11-Apr-2005 Nate Begeman <natebegeman@mac.com> Fix libcall code to not pass a NULL Chain to LowerCallTo
Fix libcall code to not crash or assert looking for an ADJCALLSTACKUP node
when it is known that there is no ADJCALLSTACKDOWN to match.
Expand i64 multiply when ISD::MULHU is legal for the target.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21214 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
01ff7216dd7829d4094754086baf28aa2d7149ac 11-Apr-2005 Chris Lattner <sabre@nondot.org> Teach legalize to deal with targets that don't support some SEXTLOAD/ZEXTLOADs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6841dec8c1c071b5a417fb4172633c68301be36c 10-Apr-2005 Chris Lattner <sabre@nondot.org> don't zextload fp values!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21209 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
232ee95a09a583b7d66b90ee7ddf7fdb9c194a04 10-Apr-2005 Chris Lattner <sabre@nondot.org> Until we have a dag combiner, promote using zextload's instead of extloads.
This gives the optimizer a bit of information about the top-part of the
value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21205 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
dea29e25c32d2651e2efaff67bc30803ea24d991 10-Apr-2005 Chris Lattner <sabre@nondot.org> Fix a thinko. If the operand is promoted, pass the promoted value into
the new zero extend, not the original operand. This fixes cast bool -> long
on ppc.

Add an unrelated fixme


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21196 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
411e888c1b4155190c8cffe388631ee20693b309 09-Apr-2005 Chris Lattner <sabre@nondot.org> Legalize BRCONDTWOWAY into a BRCOND/BR pair if a target doesn't support it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f1fe32e337cf825a27a57bb3e9fb847bc91a26ce 06-Apr-2005 Nate Begeman <natebegeman@mac.com> Teach ExpandShift how to handle shifts by a constant. This allows targets
like PowerPC to codegen long shifts in many fewer instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c105e19864f2792c52bc6bb765d365308f38f461 06-Apr-2005 Nate Begeman <natebegeman@mac.com> Expand SREM and UREM for targets that claim not to have them, like PowerPC


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
79e46acd35df36477029e9f534ab1a366a98df56 04-Apr-2005 Nate Begeman <natebegeman@mac.com> Handle expanding arguments to ISD::TRUNCATE. This happens on PowerPC when
you have something like i16 = truncate i64. This fixes Regression/C/casts


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21073 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
06098e0e9bd542f227aa3802768d1416e79e9f45 04-Apr-2005 Chris Lattner <sabre@nondot.org> Fix sign_extend and zero_extend of promoted value types to expanded value
types. This occurs when casting short to long on PPC for example.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4af6e0d7836126630f579b0a34f054321187f00b 02-Apr-2005 Chris Lattner <sabre@nondot.org> Expand fabs into fneg


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2c8086f4b9916b2d02842be5e375276023225fba 02-Apr-2005 Chris Lattner <sabre@nondot.org> Several changes mixed up here. First when legalizing a DAG with pcmarker,
dont' regen the whole dag if unneccesary. Second, fix and ugly bug with
the _PARTS nodes that caused legalize to produce multiples of them.
Finally, implement initial support for FABS and FNEG. Currently FNEG is
the only one to be trusted though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5b359c6c4f052e41579ad7da9af37db4f54207d9 02-Apr-2005 Chris Lattner <sabre@nondot.org> fix some bugs in the implementation of SHL_PARTS and friends.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21004 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4759982a2d4ab597fb69d4a1113d0f35e673a4e1 02-Apr-2005 Chris Lattner <sabre@nondot.org> Turn expanded shift operations into (e.g.) SHL_PARTS if the target supports it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f4b457987fca50a1dc86e1a60dad2cff2b060945 02-Apr-2005 Chris Lattner <sabre@nondot.org> Fix a bug when inserting a libcall into a function with no other calls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ea19cd51aaf87c5cc19e7cdc2c32ddbefcac7b8f 02-Apr-2005 Nate Begeman <natebegeman@mac.com> Fix a warning about an unhandled switch case


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
fc1b1dad88a256ab5ab16dd548ad82df8efa2ca9 02-Apr-2005 Nate Begeman <natebegeman@mac.com> Add ISD::UNDEF node
Teach the SelectionDAG code how to expand and promote it
Have PPC32 LowerCallTo generate ISD::UNDEF for int arg regs used up by fp
arguments, but not shadowing their value. This allows us to do the right
thing with both fixed and vararg floating point arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20988 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
95762124a1d781cc0f8cbc4c22e9c5c1358d7ea0 31-Mar-2005 Andrew Lenharth <andrewl@lenharth.org> PCMarker support for DAG and Alpha


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20965 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d4e50bb2e23b8f9ddde629a28dab3bcdaf0633e4 29-Mar-2005 Chris Lattner <sabre@nondot.org> implement legalization of build_pair for nate


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8e21e71b248365c69c0f666518c378b5819ce6fb 26-Mar-2005 Nate Begeman <natebegeman@mac.com> Change interface to LowerCallTo to take a boolean isVarArg argument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
84734ce8ef1a21eb347d4deca0bf32d59001f751 22-Feb-2005 Chris Lattner <sabre@nondot.org> Fix a bug in the 'store fpimm, ptr' -> 'store intimm, ptr' handling code.
Changing 'op' here caused us to not enter the store into a map, causing
reemission of the code!! In practice, a simple loop like this:

no_exit: ; preds = %no_exit, %entry
%indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry ] ; <uint> [#uses=3]
%tmp.4 = getelementptr "complex long double"* %P, uint %indvar, uint 0 ; <double*> [#uses=1]
store double 0.000000e+00, double* %tmp.4
%indvar.next = add uint %indvar, 1 ; <uint> [#uses=2]
%exitcond = seteq uint %indvar.next, %N ; <bool> [#uses=1]
br bool %exitcond, label %return, label %no_exit

was being code gen'd to:

.LBBtest_1: # no_exit
movl %edx, %esi
shll $4, %esi
movl $0, 4(%eax,%esi)
movl $0, (%eax,%esi)
incl %edx
movl $0, (%eax,%esi)
movl $0, 4(%eax,%esi)
cmpl %ecx, %edx
jne .LBBtest_1 # no_exit

Note that we are doing 4 32-bit stores instead of 2. Now we generate:

.LBBtest_1: # no_exit
movl %edx, %esi
incl %esi
shll $4, %edx
movl $0, (%eax,%edx)
movl $0, 4(%eax,%edx)
cmpl %ecx, %esi
movl %esi, %edx
jne .LBBtest_1 # no_exit

This is much happier, though it would be even better if the increment of ESI
was scheduled after the compare :-/


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
595dc5408ad809b9a9a417db275c43242e54b8dc 04-Feb-2005 Chris Lattner <sabre@nondot.org> Fix a case where were incorrectly compiled cast from short to int on 64-bit
targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20030 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
272455b404eabe70ce9e033ba19ec1b6cfe603a5 02-Feb-2005 Chris Lattner <sabre@nondot.org> Fix yet another memset issue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
deb692e756cd3826e4ecc6eaec3397177c8b89ce 01-Feb-2005 Chris Lattner <sabre@nondot.org> Fix some bugs andrew noticed legalizing memset for alpha


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
99939d39c9555ebecbcd24c1b607eae52804ea37 28-Jan-2005 Chris Lattner <sabre@nondot.org> Alpha doesn't have a native f32 extload instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19880 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e76ad6de40b5e4c0399257b0438914c8c85ceaa1 28-Jan-2005 Chris Lattner <sabre@nondot.org> implement legalization of truncates whose results and sources need to be
truncated, e.g. (truncate:i8 something:i16) on a 32 or 64-bit RISC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e560521f1af300a10717ca5c73d42df9ffb1b121 28-Jan-2005 Chris Lattner <sabre@nondot.org> Get alpha working with memset/memcpy/memmove


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
13c184de29c09294ed63b01ac43e1b46c049278e 28-Jan-2005 Chris Lattner <sabre@nondot.org> CopyFromReg produces two values. Make sure that we remember that both are
legalized, and actually return the correct result when we legalize the chain first.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
fed5577066aa13948745415316ebad1c2e72507e 24-Jan-2005 Chris Lattner <sabre@nondot.org> Silence optimized warnings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9c32d3b798dc6caeebe6cea2effe80ca5e84e66e 23-Jan-2005 Chris Lattner <sabre@nondot.org> Adjust to changes in SelectionDAG interfaces
The first half of correct chain insertion for libcalls. This is not enough
to fix Fhourstones yet though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
27ff112948d059524e5f4ebe249a1da0b7c710e8 22-Jan-2005 Chris Lattner <sabre@nondot.org> Fix problems with non-x86 targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
77e77a6aa0ab25a812947aed477220dd11220a18 21-Jan-2005 Chris Lattner <sabre@nondot.org> Refactor libcall code a bit. Initial implementation of expanding int -> FP
operations for 64-bit integers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e5544f851a2a3f7b06339b132e60ad2f2d53e7b8 20-Jan-2005 Chris Lattner <sabre@nondot.org> Simplify the shift-expansion code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
84f6788044f9b1b47945e98ce23a6cf4d7d32579 20-Jan-2005 Chris Lattner <sabre@nondot.org> Expand add/sub into ADD_PARTS/SUB_PARTS instead of a non-existant libcall.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19715 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3d9dffc5863d0319aa9c5cb156045ae6778cba01 19-Jan-2005 Chris Lattner <sabre@nondot.org> Add support for targets that pass args in registers to calls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19703 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1e81b9e5112c40c23ecca9a64b6ab2ce97c8c6d4 19-Jan-2005 Chris Lattner <sabre@nondot.org> Fold single use token factor nodes into other token factor nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19701 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ec39a45bdb1eca0cfe77be6a05cc43e16f2338eb 19-Jan-2005 Chris Lattner <sabre@nondot.org> Realize the individual pieces of an expanded copytoreg/store/load are
independent of each other.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e34b396ab7d28469bf3d9679a748b643d8e30458 19-Jan-2005 Chris Lattner <sabre@nondot.org> Implement a way of expanding shifts. This applies to targets that offer
select operations or to shifts that are by a constant. This automatically
implements (with no special code) all of the special cases for shift by 32,
shift by < 32 and shift by > 32.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
d5d56825123665b60d4eada0a4ad7d0adc5cf3a3 18-Jan-2005 Chris Lattner <sabre@nondot.org> Zero is cheaper than sign extend.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19675 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
47e9223e06390897c3834f8c527001df392570ff 18-Jan-2005 Chris Lattner <sabre@nondot.org> Fix some fixmes (promoting bools for select and brcond), fix promotion
of zero and sign extends.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19671 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ef5cd1d3cf7d0b20987a545fcd2d0af2bfe6c422 18-Jan-2005 Chris Lattner <sabre@nondot.org> Teach legalize to promote copy(from|to)reg, instead of making the isel pass
do it. This results in better code on X86 for floats (because if strict
precision is not required, we can elide some more expensive double -> float
conversions like the old isel did), and allows other targets to emit
CopyFromRegs that are not legal for arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
82fbfb6984c1feb7d44a077ac2dc031f4a950005 18-Jan-2005 Chris Lattner <sabre@nondot.org> Teach legalize to promote SetCC results.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f30b73b1c6b6ca8453dc61eb3777b4e4414d3839 18-Jan-2005 Chris Lattner <sabre@nondot.org> Allow setcc operations to have nonbool types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8ac532c55eb7f8698466f25d1a8a01240c44ec7d 16-Jan-2005 Chris Lattner <sabre@nondot.org> Implement legalize of call nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19617 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
55ba8fba750ee0a51a9d74fa33b7242d24a4ff35 16-Jan-2005 Chris Lattner <sabre@nondot.org> Revamp supported ops. Instead of just being supported or not, we now keep
track of how to deal with it, and provide the target with a hook that they
can use to legalize arbitrary operations in arbitrary ways.

Implement custom lowering for a couple of ops, implement promotion for select
operations (which x86 needs).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f8161d83f0201a32a33a0c875eb43df81d8586ab 16-Jan-2005 Chris Lattner <sabre@nondot.org> Implement some more missing promotions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19606 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
9467497ae2aef3534623ca20d01f49f3441ea154 16-Jan-2005 Chris Lattner <sabre@nondot.org> Clarify assertion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
71c42a0190300a8903aaea80467b88f15f327ea9 16-Jan-2005 Chris Lattner <sabre@nondot.org> Move some information into the TargetLowering object.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
1713e73b8ac53f045150cb2a7d7ba9781dc35ef8 16-Jan-2005 Chris Lattner <sabre@nondot.org> legalize a bunch of operations that I missed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ff3e50cc39db6939b637165997283f59412387bb 16-Jan-2005 Chris Lattner <sabre@nondot.org> Fix some serious bugs in promotion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8b6fa22e722e1de7522aae51d6cdd0f552d489da 15-Jan-2005 Chris Lattner <sabre@nondot.org> Implement promotion of a whole bunch more operators. I think that this is
basically everything.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
45b8caf1c5a1fd8337038d64c6da8fba2d299fdf 15-Jan-2005 Chris Lattner <sabre@nondot.org> Add support for legalizing FP_ROUND_INREG, SIGN_EXTEND_INREG, and
ZERO_EXTEND_INREG for targets that don't support them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
0f69b2910810b7c0971a739f18b37fae2a20eca5 15-Jan-2005 Chris Lattner <sabre@nondot.org> Add support for promoting ADD/MUL.
Add support for new SIGN_EXTEND_INREG, ZERO_EXTEND_INREG, and FP_ROUND_INREG operators.
Realize that if we do any promotions, we need to iterate SelectionDAG
construction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19569 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
03c8546ec57523970874917854a2fb77b1ff598e 15-Jan-2005 Chris Lattner <sabre@nondot.org> Add intitial support for promoting some operators.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
69a52155d2eff066b49dbac385113002fd9dba14 14-Jan-2005 Chris Lattner <sabre@nondot.org> Adjust to CopyFromReg changes, implement deletion of truncating/extending
stores/loads.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2ee743ff9be43c350075a2fa15d11a79bff36775 14-Jan-2005 Chris Lattner <sabre@nondot.org> Start implementing truncating stores and extending loads.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
18c2f13e0f9d0e5d6227cf6d1881e9ee3d1b6109 13-Jan-2005 Chris Lattner <sabre@nondot.org> Add new ImplicitDef node, rename CopyRegSDNode class to RegSDNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
a385e9b20fa7d37d3842ce15afd412f617d83a27 13-Jan-2005 Chris Lattner <sabre@nondot.org> Legalize new node, add assertion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19527 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
2dad454af674cb41a14a85ad6ce5c85c43959acd 12-Jan-2005 Chris Lattner <sabre@nondot.org> Fix sign extend to long. When coming from sbyte, we used to generate:

movsbl 4(%esp), %eax
movl %eax, %edx
sarl $7, %edx

Now we generate:

movsbl 4(%esp), %eax
movl %eax, %edx
sarl $31, %edx

Which is right.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3bfbf4ea990930d153e58e153f319408341a94fe 12-Jan-2005 Reid Spencer <rspencer@reidspencer.com> Shut up warnings with GCC 3.4.3 about uninitialized variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19512 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
64da653ba916509757daa47424d2a8217d82ba76 11-Jan-2005 Chris Lattner <sabre@nondot.org> Squelch optimized warning.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e1bd822ddb0099406d9f280535461033dfeeb190 11-Jan-2005 Chris Lattner <sabre@nondot.org> Teach legalize to lower MEMSET/MEMCPY/MEMMOVE operations if the target
does not support them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
6b7598b9955520af8942740acda96a99b005c839 10-Jan-2005 Chris Lattner <sabre@nondot.org> Lower to the correct functions. This fixes FreeBench/fourinarow


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
38d6be5d49e61e4be9bb12ee3cedf2a4fcddb8f3 09-Jan-2005 Chris Lattner <sabre@nondot.org> Fix a bug legalizing call instructions (make sure to remember all result
values), and eliminate some switch statements.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19417 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
513e52ec4e20048a8f491498d219a2669283f3bd 09-Jan-2005 Chris Lattner <sabre@nondot.org> Fix a minor bug legalizing dynamic_stackalloc. This allows us to compile
std::__pad<wchar_t, std::char_traits<wchar_t> >::_S_pad(std::ios_base&, wchar_t, wchar_t*, wchar_t const*, int, int, bool)

from libstdc++


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19416 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
fa404e8a76abfdafefb8806b35f596d288609496 09-Jan-2005 Chris Lattner <sabre@nondot.org> Teach legalize to deal with DYNAMIC_STACKALLOC (aka a dynamic llvm alloca)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
e3304a3d24afc952d3cb415d1b504d973573c5c5 08-Jan-2005 Chris Lattner <sabre@nondot.org> Tighten up assertions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
f26bc8ef4827cf0023a7052b62b920b41813d473 08-Jan-2005 Chris Lattner <sabre@nondot.org> Silence VS warnings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
4e6c74689944be1de80c99dc0688ec0bcbd743aa 08-Jan-2005 Chris Lattner <sabre@nondot.org> Implement handling of most long operators through libcalls.
Fix a bug legalizing "ret (Val,Val)"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ae0aacb8331e1227abea6601e531a10d0e65fdca 08-Jan-2005 Chris Lattner <sabre@nondot.org> Add support for FP->INT conversions and back.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
5d2c6c784bdc3d572a553ed7aa48dcf27a45b1a3 08-Jan-2005 Chris Lattner <sabre@nondot.org> Implement the 'store FPIMM, Ptr' -> 'store INTIMM, Ptr' optimization for
all targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b00a6425de1ef8668b63f29927c38da8a19ce904 07-Jan-2005 Chris Lattner <sabre@nondot.org> Add support for truncating integer casts from long.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19358 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
8afc48e44ad8868c1d41511db645e2ba1a4b894e 07-Jan-2005 Chris Lattner <sabre@nondot.org> Fix a bug in load expansion legalization and ret legalization. This fixes
CodeGen/Generic/select.ll:castconst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c7af17923e3bb6053f529679ef0be5399d3519ed 07-Jan-2005 Chris Lattner <sabre@nondot.org> Legalize unconditional branches too


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
7cc4777a263f6a52877d29201311fde5f6edb632 07-Jan-2005 Chris Lattner <sabre@nondot.org> Implement support for long GEP indices on 32-bit archs and support for
int GEP indices on 64-bit archs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
03c0cf822e9a57109d1b4e6a2705d68852c93e1d 07-Jan-2005 Chris Lattner <sabre@nondot.org> implement legalization of a bunch more operators.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
fad71ebe1ebdc8d59c26e4e45a7c7579a2ca58b7 07-Jan-2005 Chris Lattner <sabre@nondot.org> Fix another bug legalizing calls!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
ebda942efcb86634a6581aae76a0d0c92c4a232e 07-Jan-2005 Chris Lattner <sabre@nondot.org> Fix a bug legalizing calls


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
62fd269c146d9023efe32644e44cd97b88631d4f 07-Jan-2005 Chris Lattner <sabre@nondot.org> After legalizing a DAG, delete dead nodes to save space.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
c18ae4cb6a263cf31283c0ef51ace24350f8d72b 07-Jan-2005 Chris Lattner <sabre@nondot.org> Teach legalize how to handle condbranches


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
3e928bbd6153eb08641cbd0ad7d8487378a8b12a 07-Jan-2005 Chris Lattner <sabre@nondot.org> Initial implementation of the DAG legalization. This still has a long way
to go, but it does work for some non-trivial cases now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19329 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp