History log of /external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f3ca3afcd05d585f6a2b7c2f432b7c0b8dd5f1a3 20-Oct-2016 Pirama Arumuga Nainar <pirama@google.com> Fix *_EXTEND_VECTOR_INREG legalization

Summary:
While promoting *_EXTEND_VECTOR_INREG nodes whose inputs are already
promoted, perform the appropriate sign extension for the promoted node
before doing the *_EXTEND_VECTOR_INREG operation. If not, the undefined
high-order bits of the promoted operand may (a) be garbage inc ase of
zext) or (b) contribute the wrong sign-bit (in case of sext)

Updated the promote-vec3.ll test after this change. The diff shows
explicit zeroing in case of zext and intermediate sign extension in case
of sext.

Reviewers: RKSimon

Subscribers: llvm-commits, srhines

Differential Revision: https://reviews.llvm.org/D25790

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284752 91177308-0d34-0410-b5e6-96231b3b80d8

Change-Id: I64ef63d3920357e2818593e0d4ed0bdb41db3949
(cherry picked from commit a61ffbf0a65ae44cd90216e23b3b4ad5cb230381)
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
bfb28599d323cca7e86f80507e7bfcadfeea178a 07-Oct-2016 Pirama Arumuga Nainar <pirama@google.com> Incremental squash-merge of aosp/dev to aosp/master

Bug: http://b/31320715

This merges commit d3221fcdce064148886034527a19dbd77743f9e2 from
aosp/dev including r283496.

Test: Build AOSP and run RenderScript tests (host tests for slang and
libbcc, RsTest, CTS)

Change-Id: I2cabd64cfa333498a4fec52bdf14eafb59676e14
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
de2d8694e25a814696358e95141f4b1aa4d8847e 20-Sep-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master LLVM for rebase to r275480

Bug: http://b/31320715

This merges commit 7dcf7f03e005379ef2f06db96aa93f06186b66d5 from
aosp/dev.

Test: Build AOSP and run RenderScript tests (host tests for slang and
libbcc, RsTest, CTS)

Change-Id: Iaf3738f74312d875e69f61d604ac058f381a2a1a
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
50e3862b54ab5bddfeae300b0d686ac426de53f6 24-Mar-2016 Pirama Arumuga Nainar <pirama@google.com> Remove unsafe AssertZext after promoting result of FP_TO_FP16

Summary:
Some target lowerings of FP_TO_FP16, for instance ARM's vcvtb.f16.f32
instruction, do not guarantee that the top 16 bits are zeroed out.
Remove the unsafe AssertZext and add tests to exercise this.

Reviewers: jmolloy, sbaranga, kristof.beyls, aadg

Subscribers: llvm-commits, srhines, aemerson

Differential Revision: http://reviews.llvm.org/D18426

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
f3ef5332fa3f4d5ec72c178a2b19dac363a19383 04-Mar-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master LLVM for rebase to r256229

http://b/26987366

Change-Id: I1f29c4676a8abe633ab5707dded58d846c973d50
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
6948897e478cbd66626159776a8017b3c18579b9 01-Jul-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master LLVM for rebase to r239765

Bug: 20140355: This rebase pulls the upstream fix for the spurious
warnings mentioned in the bug.

Change-Id: I7fd24253c50f4d48d900875dcf43ce3f1721a3da
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
a18e6af1712fd41c4a705a19ad71f6e9ac7a4e68 20-May-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master LLVM with patches for fp16

Cherry-pick LLVM revisions r235191, r235215, r235220, r235341, r235363,
r235530, r235609, r235610, r237004

r235191 has a required bug-fix and the rest are all related to fp16.

Change-Id: I7fe8da5ffd8f2c06150885a54769abd18c3a04c6
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
4c5e43da7792f75567b693105cc53e3f1992ad98 08-Apr-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master llvm for rebase to r233350

Change-Id: I07d935f8793ee8ec6b7da003f6483046594bca49
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
ebe69fe11e48d322045d5949c83283927a0d790b 23-Mar-2015 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r230699.

Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
37ed9c199ca639565f6ce88105f9e39e898d82d0 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r222494.

Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
4acef6e4d7d7e6eeabf3a98da1d5e240489be71b 12-Sep-2014 Benjamin Kramer <benny.kra@googlemail.com> Legalizer: Use the scalar bit width when promoting bit counting instrs on
vectors.

e.g. when promoting ctlz from <2 x i32> to <2 x i64> we have to fixup
the result by 32 bits, not 64. PR20917.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217671 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
c6a4f5e819217e1e12c458aed8e7b122e23a3a58 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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
477fc628b3c9ce1c970d4a678dd5607b15242cc8 24-Sep-2013 Jiangning Liu <jiangning.liu@arm.com> Initial support for Neon scalar instructions.

Patch by Ana Pazos.

1.Added support for v1ix and v1fx types.
2.Added Scalar Pairwise Reduce instructions.
3.Added initial implementation of Scalar Arithmetic instructions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
3add0679d24a00c4a585809c6ce54486f6a458f5 13-Aug-2013 Michael Gottesman <mgottesman@apple.com> Update makeLibCall to return both the call and the chain associated with the libcall instead of just the call. This allows us to specify libcalls that return void.

LowerCallTo returns a pair with the return value of the call as the first
element and the chain associated with the return value as the second element. If
we lower a call that has a void return value, LowerCallTo returns an SDValue
with a NULL SDNode and the chain for the call. Thus makeLibCall by just
returning the first value makes it impossible for you to set up the chain so
that the call is not eliminated as dead code.

I also updated all references to makeLibCall to reflect the new return type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
6c75160b875799a9303879e11022edf4ba44c3f9 08-Jul-2013 Hal Finkel <hfinkel@anl.gov> Improve the comment from r185794 (re: PromoteIntRes_BUILD_VECTOR)

In response to Duncan's review, I believe that the original comment was not as
clear as it could be. Hopefully, this is better.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185824 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
63e7a38c8980d70197ecdb9ba54b79b87c7b064d 08-Jul-2013 Hal Finkel <hfinkel@anl.gov> Fix PromoteIntRes_BUILD_VECTOR crash with i1 vectors

This fixes a bug (found by llvm-stress) in
DAGTypeLegalizer::PromoteIntRes_BUILD_VECTOR where it assumed that the result
type would always be larger than the original operands. This is not always
true, however, with boolean vectors. For example, promoting a node of type v8i1
(where the operands will be of type i32, the type to which i1 is promoted) will
yield a node with a result vector element type of i16 (and operands of type
i32). As a result, we cannot blindly assume that we can ANY_EXTEND the operands
to the result type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
dfccd9ee98cd6590bd82fa6edf24d510d953a2a0 28-Jun-2013 Lang Hames <lhames@gmail.com> Add missing case to switch statement - DAGTypeLegalizer::ExpandIntegerResult
should expand ATOMIC_CMP_SWAP nodes the same way that it does for ATOMIC_SWAP.

Since ATOMIC_LOADs on some targets (e.g. older ARM variants) get legalized to
ATOMIC_CMP_SWAPs, the missing case had been causing i64 atomic loads to crash
during isel.

<rdar://problem/14074644>



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
71da6755c8b0a7444be5531798556c00f4dad101 15-May-2013 Hal Finkel <hfinkel@anl.gov> Fix legalization of SETCC with promoted integer intrinsics

If the input operands to SETCC are promoted, we need to make sure that we
either use the promoted form of both operands (or neither); a mixture is not
allowed. This can happen, for example, if a target has a custom promoted
i1-returning intrinsic (where i1 is not a legal type). In this case, we need to
use the promoted form of both operands.

This change only augments the behavior of the existing logic in the case where
the input types (which may or may not have already been legalized) disagree,
and should not affect existing target code because this case would otherwise
cause an assert in the SETCC operand promotion code.

This will be covered by (essentially all of the) tests for the new PPCCTRLoops
infrastructure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
5622eaeffef44dd09a1dd061299d6c02d9ad4099 04-Apr-2013 Eli Bendersky <eliben@google.com> Formatting


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
a6b20ced765b67a85d9219d0c8547fc9c133e14f 01-Mar-2013 Michael Liao <michael.liao@intel.com> Fix PR10475

- ISD::SHL/SRL/SRA must have either both scalar or both vector operands
but TLI.getShiftAmountTy() so far only return scalar type. As a
result, backend logic assuming that breaks.
- Rename the original TLI.getShiftAmountTy() to
TLI.getScalarShiftAmountTy() and re-define TLI.getShiftAmountTy() to
return target-specificed scalar type or the same vector type as the
1st operand.
- Fix most TICG logic assuming TLI.getShiftAmountTy() a simple scalar
type.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
0fef46f50e116e9aa0811ba8eb605d82ab64faed 27-Jan-2013 Benjamin Kramer <benny.kra@googlemail.com> Legalizer: Reword comment again, per Duncan's suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173625 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
022688c260f472b4befcd974a6c907c6830f308e 27-Jan-2013 Benjamin Kramer <benny.kra@googlemail.com> Legalizer: Add an assert and tweak a comment to clarify the assumptions this code makes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
914f8c4825140a97219e94b815beb2bc77395d10 27-Jan-2013 Benjamin Kramer <benny.kra@googlemail.com> When the legalizer is splitting vector shifts, the result may not have the right shift amount type.

Fix that by adding a cast to the shift expander. This came up with vector shifts
on sse-less X86 CPUs.

<2 x i64> = shl <2 x i64> <2 x i64>
-> i64,i64 = shl i64 i64; shl i64 i64
-> i32,i32,i32,i32 = shl_parts i32 i32 i64; shl_parts i32 i32 i64

Now we cast the last two i64s to the right type. Fixes the crash in PR14668.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173615 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
444b4bf5c84c80833ff283244de0885124091a13 27-Dec-2012 Nadav Rotem <nrotem@apple.com> Refactor DAGCombinerInfo. Change the different booleans that indicate if we are before or after different runs of DAGCo, with the CombineLevel enum.
Also, added a new API for checking if we are running before or after the LegalizeVectorOps phase.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
48da0be8b5821dddbb5233ad9cb198369031684b 02-Oct-2012 Duncan Sands <baldrick@free.fr> Fix PR13991: legalizing an overflowing multiplication operation is harder than
the add/sub case since in the case of multiplication you also have to check that
the operation in the larger type did not overflow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165017 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
94c22716d60ff5edf6a98a3c67e0faa001be1142 27-Sep-2012 Sylvestre Ledru <sylvestre@debian.org> Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
7e2c793a2b5c746344652b6579e958ee42fafdcc 27-Sep-2012 Sylvestre Ledru <sylvestre@debian.org> Fix a typo 'iff' => 'if'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164767 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
ffaf69b8b118808ca35ab84d477fd2e4e54cce90 14-Sep-2012 Eric Christopher <echristo@apple.com> Fix both the test for zero and what we do if we have a zero for
umulo legalization.

Fixes PR13839

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
331f64cd0dc1249d0708af63b4d13509850c234e 14-Sep-2012 Eric Christopher <echristo@apple.com> Reformat, remove a couple unused variables and move some variables
closer to where they're needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
0fc44aba18ed2f557805ce84fe597356f026f202 01-Sep-2012 Pete Cooper <peter_cooper@apple.com> Revert "Take account of boolean vector contents when promoting a build vector from i1 to some other type. rdar://problem/12210060"

This reverts commit 5dd9e214fb92847e947f9edab170f9b4e52b908f.

Thanks to Duncan for explaining how this should have been done.

Conflicts:

test/CodeGen/X86/vec_select.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163064 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
5dd9e214fb92847e947f9edab170f9b4e52b908f 31-Aug-2012 Pete Cooper <peter_cooper@apple.com> Take account of boolean vector contents when promoting a build vector from i1 to some other type. rdar://problem/12210060

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162960 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
96cb1128528a512f1ef9c28ae5e1b78a98dcc505 19-Jul-2012 Bill Wendling <isanbard@gmail.com> Remove tabs.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
5589a69f0abd39e583786515cf6c9170554dc8de 17-Jul-2012 Nadav Rotem <nadav.rotem@intel.com> Fix a crash in the legalization of large vectors.
When truncating a result of a vector that is split we need
to use the result of the split vector, and not re-split the dead node.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
26c8dcc692fb2addd475446cfff24d6a4e958bca 04-Apr-2012 Rafael Espindola <rafael.espindola@gmail.com> Always compute all the bits in ComputeMaskedBits.
This allows us to keep passing reduced masks to SimplifyDemandedBits, but
know about all the bits if SimplifyDemandedBits fails. This allows instcombine
to simplify cases like the one in the included testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
f1820b54e4d08ed78ca76b80b8bebb91cdc798a5 29-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> LegalizeIntegerTypes: Reorder operations in the "big shift by small amount" optimization, making the lives of later passes easier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
a3b2121ccf4f048640b4d79689b0e4a3906143f2 28-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Fix off-by one in comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
3bf15ced2b91661ac314911c1f28332da0e1c37c 28-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> LegalizeIntegerTypes: Reenable the large shift with small amount optimization.

To avoid problems with zero shifts when getting the bits that move between words
we use a trick: first shift the by amount-1, then do another shift by one. When
amount is 0 (and size 32) we first shift by 31, then by one, instead of by 32.

Also fix a latent bug that emitted the low and high words in the wrong order
when shifting right.

Fixes PR12113.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151637 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
819026f2f8b13ac7f6051727fce54b95868c3d85 18-Jan-2012 Nadav Rotem <nadav.rotem@intel.com> Fix a bug in the type-legalization of vector integers. When we bitcast one vector type to another, we must not bitcast the result if one type is widened while the other is promoted.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
2bd335470f8939782f3df7f6180282d3825d4f09 10-Jan-2012 David Blaikie <dblaikie@gmail.com> Remove unnecessary default cases in switches that cover all enum values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
6059b836959f4c1f1da651779d03d0de37f74a8f 28-Dec-2011 Nadav Rotem <nadav.rotem@intel.com> PR11662.

Promotion of the mask operand needs to be done using PromoteTargetBoolean, and not padded with garbage.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147309 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
fbb6f593c264551a5d585a6c97ff03420b142ea3 25-Dec-2011 Nadav Rotem <nadav.rotem@intel.com> Fix a typo in the widening of vectors in PromoteIntRes. Patch by Shemer Anat.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
44bac7cd659090f15face5171e3c346983aeb521 08-Dec-2011 Nadav Rotem <nadav.rotem@intel.com> Fix a bug in the integer-promotion of bitcast operations on vector types.
We must not issue a bitcast operation for integer-promotion of vector types, because the
location of the values in the vector may be different.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146150 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
d577df8e5ada3f4f97fa90bdc46c6f9b1db1dee1 16-Nov-2011 Eli Friedman <eli.friedman@gmail.com> CONCAT_VECTORS can have more than two operands. PR11389.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
8c2e35269c10914c16f351449fb9b8108ccb2556 15-Nov-2011 Jay Foad <jay.foad@gmail.com> Remove some unnecessary includes of PseudoSourceValue.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
4bd222ae26d0411d5c67fd0ab5c043422b5f201b 21-Oct-2011 Nadav Rotem <nadav.rotem@intel.com> 1. Fix the widening of SETCC in WidenVecOp_SETCC. Use the correct return CC type.
2. Fix a typo in CONCAT_VECTORS which exposed the bug in #1.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142648 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
e65177f965063c16321166c13d90a91aa57b5ee8 20-Oct-2011 Chad Rosier <mcrosier@apple.com> Revert r142579, "Fix a type in the legalization of CONCAT_VECTORS". This is
causing one of the unit tests to infinitely loop, which resulted in the
buildbots stalling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142604 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
28e65b52458f944c8204fecf7eab466c90b6686f 20-Oct-2011 Nadav Rotem <nadav.rotem@intel.com> Fix a type in the legalization of CONCAT_VECTORS.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
a3c42f3d4e5d14c8f4fb9bb123e7759c425d041b 27-Sep-2011 Nadav Rotem <nadav.rotem@intel.com> Cleanup PromoteIntOp_EXTRACT_VECTOR_ELT and PromoteIntRes_SETCC.
Add a new method: getAnyExtOrTrunc and use it to replace the manual check.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
0eba4fe292a0bb343da5fb2667850a39459cef0b 25-Sep-2011 Nadav Rotem <nadav.rotem@intel.com> [vector-select] Address one of the issues in pr10902. EXTRACT_VECTOR_ELEMENT
SDNodes may return values which are wider than the incoming element types. In
this patch we fix the integer promotion of these nodes.

Fixes spill-q.ll when running -promote-elements.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140471 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
17e76bda552d5afa652c4bb45f6dbdad67dc5c20 24-Sep-2011 Nadav Rotem <nadav.rotem@intel.com> Implement Duncan's suggestion to use the result of getSetCCResultType if it is legal
(this is always the case for scalars), otherwise use the promoted result type.

Fix test/CodeGen/X86/vsplit-and.ll when promote-elements is enabled.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
4c19e12d28749c717d3b384962c9ec92796af1c9 23-Sep-2011 Duncan Sands <baldrick@free.fr> Tweak the handling of MERGE_VALUES nodes: remove the need for
DecomposeMERGE_VALUES to "know" that results are legalized in
a particular order, by passing it the number of the result
being legalized (the type legalization core provides this, it
just needs to be passed on).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140373 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
c56d65f63cd632ef57d9f80b4539f15a2f937364 23-Sep-2011 Nadav Rotem <nadav.rotem@intel.com> Vector-Select: Address one of the problems in pr10902. Add handling for the
integer-promotion of CONCAT_VECTORS.

Test: test/CodeGen/X86/widen_shuffle-1.ll

This patch fixes the above tests (when running in with -promote-elements).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
1147248e6f40f2e5655f3d8243fe7ba49ed75d0a 21-Sep-2011 Nadav Rotem <nadav.rotem@intel.com> [VECTOR-SELECT] Address one of the bugs in pr10902.

Vector SetCC result types need to be type-legalized.
This code worked before because scalar result types are known to be legal.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
436fe8498a0a3368d2690290e805213a0f114d0d 14-Sep-2011 Nadav Rotem <nadav.rotem@intel.com> Add integer promotion support for vselect

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139692 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
28b77e968d2b01fc9da724762bd8ddcd80650e32 06-Sep-2011 Duncan Sands <baldrick@free.fr> Add codegen support for vector select (in the IR this means a select
with a vector condition); such selects become VSELECT codegen nodes.
This patch also removes VSETCC codegen nodes, unifying them with SETCC
nodes (codegen was actually often using SETCC for vector SETCC already).
This ensures that various DAG combiner optimizations kick in for vector
comparisons. Passes dragonegg bootstrap with no testsuite regressions
(nightly testsuite as well as "make check-all"). Patch mostly by
Nadav Rotem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
fcd75e5efb482f35cfc22fd4b64e047930130fd6 31-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Misc cleanup; addresses Duncan's comments on r138877.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
62bb16cfd10dd271eab6c31d982bca4d79138602 31-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Fill in type legalization for MERGE_VALUES in all the various cases. Patch by Micah Villmow. (No testcase because the issue only showed up in an out-of-tree backend.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138877 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
ba567d670d32e102a70b106fbfe284835085cb3f 31-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Generic expansion for atomic load/store into cmpxchg/atomicrmw xchg; implements 64-bit atomic load/store for ARM.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
55ba816883842e793cdeb32fcb805c4e011b527f 29-Jul-2011 Eli Friedman <eli.friedman@gmail.com> Misc optimizer+codegen work for 'cmpxchg' and 'atomicrmw'. They appear to be
working on x86 (at least for trivial testcases); other architectures will
need more work so that they actually emit the appropriate instructions for
orderings stricter than 'monotonic'. (As far as I can tell, the ARM, PPC,
Mips, and Alpha backends need such changes.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136457 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
2ff4bc615584fa9f32e64959767d64f2cb09fb99 28-Jul-2011 Nadav Rotem <nadav.rotem@intel.com> CR fix: The ANY_EXTEND can be removed because the input and putput type must be
identical.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
811ad8690b798cdcbd9d80a2b6a404145222b9a9 17-Jul-2011 Nadav Rotem <nadav.rotem@intel.com> Minor code cleanups

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
4720611025276f01b158a1522620391332ffdc32 20-Jun-2011 Nadav Rotem <nadav.rotem@intel.com> Fix PromoteIntRes_TRUNCATE: Add support for cases where the
source vector type is to be split while the target vector is to be promoted.
(eg: <4 x i64> -> <4 x i8> )


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
5b82c2f8911e7e7bcaa563cf15b5d03cf0292379 19-Jun-2011 Nadav Rotem <nadav.rotem@intel.com> Code cleanups: Remove duplicated logic in PromotInteRes_BITCAST, reserve vector space, reuse types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133389 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
0928c9e18a1decd856501beeea1bd12453a366b3 19-Jun-2011 Nadav Rotem <nadav.rotem@intel.com> Calls to AssertZext and getZeroExtendInReg must be made using scalar types.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
1396c403897e3d3e04fbf59f6c5fe77cbbab74a6 18-Jun-2011 Benjamin Kramer <benny.kra@googlemail.com> Remove unused but set variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
a3071455e540530ecb644a2e59098129f70ce705 18-Jun-2011 Eric Christopher <echristo@apple.com> Fix UMULO support for 2x register width to allow the full
range without a libcall to a new mulo<mode> libcall
that we'd have to create.

Finishes the rest of rdar://9090077 and rdar://9210061


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
5e687ac6158bc28f1831699d7dbfa39d3120b892 18-Jun-2011 Eric Christopher <echristo@apple.com> Fix comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133307 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
362fee90b9a1d64ac091755466caf6a94ade22eb 17-Jun-2011 Eric Christopher <echristo@apple.com> Lower multiply with overflow checking to __mulo<mode>
calls if we haven't been able to lower them any
other way.

Fixes rdar://9090077 and rdar://9210061


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133288 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
8e614322498f9b38995a6bf41100ca617180eacb 15-Jun-2011 Nadav Rotem <nadav.rotem@intel.com> getZeroExtendInReg needs to get a scalar type

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
b3e009a165a423536acfa5861c12ef631239d9e4 11-Jun-2011 Eric Christopher <echristo@apple.com> 80-col cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
fc3623bc50aa9e2a56736775edbd3ae919565351 06-Jun-2011 Nadav Rotem <nadav.rotem@intel.com> Add methods to support the integer-promotion of vector types. Methods to
legalize SDNodes such as BUILD_VECTOR, EXTRACT_VECTOR_ELT, etc.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132689 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
96e0c5477c41b316263e894bbb5821c7cdeb25ef 01-Jun-2011 Nadav Rotem <nadav.rotem@intel.com> Refactor LegalizeTypes: Erase LegalizeAction and make the type legalizer use
the TargetLowering enum.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132418 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
53dfa78e4133f6cdb5d860279adc337ea099ac15 04-Mar-2011 Duncan Sands <baldrick@free.fr> Revert commit 126684 "Use the correct shift amount type". It is only the correct
type after type legalization has completed. Before then it may simply not be big
enough to hold the shift amount, particularly on x86 which uses a very small type
for shifts (this issue broke stuff in the past which is why LegalizeTypes carefully
uses a large type for shift amounts).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
81c5ef8649e12ac6083307bb149fd7006d9e0501 03-Mar-2011 Eli Friedman <eli.friedman@gmail.com> Revert r123908; the code in question is completely untested and wrong.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
69732892087e70182d863cc72453be30f31b7793 28-Feb-2011 Owen Anderson <resistor@mac.com> Use the correct shift amount type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
c6d160bfa22fcb06c80c4c6cfc10ddbe7d8d28e4 28-Feb-2011 Owen Anderson <resistor@mac.com> Clean whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126683 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
fbd53f79f5d475d103fba9303a4aa7e88567dd1a 17-Feb-2011 Duncan Sands <baldrick@free.fr> Fix wrong logic in promotion of signed mul-with-overflow (I pointed this out at
the time but presumably my email got lost). Examples where the previous logic
got it wrong: (1) a signed i8 multiply of 64 by 2 overflows, but the high part is
zero; (2) a signed i8 multiple of -128 by 2 overflows, but the high part is all
ones.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
e075118489baf15a7cea2e7f155b4799b93d6d02 13-Feb-2011 Chris Lattner <sabre@nondot.org> Revisit my fix for PR9028: the issue is that DAGCombine was
generating i8 shift amounts for things like i1024 types. Add
an assert in getNode to prevent this from occuring in the future,
fix the buggy transformation, revert my previous patch, and
document this gotcha in ISDOpcodes.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
915eeb488786379250808d47668c43e010efe566 13-Feb-2011 Chris Lattner <sabre@nondot.org> when legalizing extremely wide shifts, make sure that
the shift amounts are in a suitably wide type so that
we don't generate out of range constant shift amounts.

This fixes PR9028.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125458 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
02050986d96d1880ec3015cb97c41d1dbad865d6 20-Jan-2011 Eric Christopher <echristo@apple.com> Expand invalid return values for umulo and smulo. Handle these similarly
to add/sub by doing the normal operation and then checking for overflow
afterwards. This generally relies on the DAG handling the later invalid
operations as well.

Fixes the 64-bit part of rdar://8622122 and rdar://8774702.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123908 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
955ed73d12f2b186ef3f80da872b702cd7f2895b 18-Jan-2011 Jeffrey Yasskin <jyasskin@google.com> Remove unused variables found by gcc-4.6's -Wunused-but-set-variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123707 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
93c70426f581859f197df1b05fdb1b3664d361a0 11-Jan-2011 Eric Christopher <echristo@apple.com> Move ExpandAtomic into the integer expansion routines - it's only used there.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123202 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
8d93d19076fb6a67eeb63cb0ba79d00c3aa8478a 06-Jan-2011 Eric Christopher <echristo@apple.com> Add some fairly duplicated code to let type legalization split illegal
typed atomics. This will lower exclusively to libcalls at the moment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122979 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
5c3d4f0fc90c86a6c4ee9871835d70c9ff3833d5 20-Dec-2010 Chris Lattner <sabre@nondot.org> implement type legalization promotion support for SMULO and UMULO, giving
ARM (and other 32-bit-only) targets support for i8 and i16 overflow
multiplies. The generated code isn't great, but this at least fixes
CodeGen/Generic/overflow.ll when running on ARM hosts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
5078293cc28dd03236384fa0a3b6c8347e0701fb 20-Dec-2010 Chris Lattner <sabre@nondot.org> reduce indentation, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122208 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
7a874ddda037349184fbeb22838cc11a1a9bb78f 01-Dec-2010 Jay Foad <jay.foad@gmail.com> PR5207: Rename overloaded APInt methods set(), clear(), flip() to
setAllBits(), setBit(unsigned), etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
0531356e4da1451b1b0b9e8c85365c2a58ca8282 21-Sep-2010 Chris Lattner <sabre@nondot.org> don't implicitly drop the offset of a machinememoperand when legalizing atomics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
54e1791e4ba30867bda603acadda77fa85de6aa1 23-Jul-2010 Eric Christopher <echristo@apple.com> 80-col.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109205 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
268637ed0f34e10e4125e94c44ff3e2975a19166 03-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Implement expansion in type legalization for add/sub with overflow. The
expansion is the same as that used by LegalizeDAG.

The resulting code sucks in terms of performance/codesize on x86-32 for a
64-bit operation; I haven't looked into whether different expansions might be
better in general.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
8d908ebd1926d00ff47d8284e52657705efb7f9b 15-May-2010 Dale Johannesen <dalej@apple.com> Fix uint64->{float, double} conversion to do rounding correctly in 32-bit.

The implementation in LegalizeIntegerTypes to handle this as
sint64->float + appropriate power of 2 is subject to double rounding,
considered incorrect by numerics people. Use this implementation only
when it is safe. This leads to using library calls in some cases
that produced inline code before, but it's correct now.
(EVTToAPFloatSemantics belongs somewhere else, any suggestions?)

Add a correctly rounding (though not particularly fast) conversion
that uses X87 80-bit computations for x86-32.

7885399, 5901940. This shows up in gcc.c-torture/execute/ieee/rbug.c
in the gcc testsuite on some platforms.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103883 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
285fb1cc4a7ea924b4d94e9c2cb890125d56a7e0 19-Apr-2010 Evan Cheng <evan.cheng@apple.com> More 80 col violation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
4ff28527bb8e5ed4ae4b65f0fa6967eb79a05d4c 17-Apr-2010 Evan Cheng <evan.cheng@apple.com> Another 80 col violation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
53f6ed9560aa4586ba217fbf94acbfada52f561f 16-Apr-2010 Evan Cheng <evan.cheng@apple.com> 80 col.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
182465c589f95ff165331d06035ec53ff05bf1f5 16-Apr-2010 Evan Cheng <evan.cheng@apple.com> 80 col.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101500 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
bc7a902713c4e3f13a93c383e647d2a18712f447 23-Mar-2010 Dan Gohman <gohman@apple.com> Revert 99335. getTypeToExpandTo's iterative behavior is actually
needed here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
349074896f17cdebf484f6be97248c6545ecf93b 23-Mar-2010 Dan Gohman <gohman@apple.com> Remove getTypeToExpandTo, since it isn't adding much value
beyond just calling getTypeToTransformTo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
5b870aff81da0c07413f0241087bb3722954b83d 02-Mar-2010 Dan Gohman <gohman@apple.com> Fix several places to handle vector operands properly.
Based on a patch by Micah Villmow for PR6438.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
d765353da89988e949fd4c021d8860f36ab7c392 05-Jan-2010 David Greene <greened@obbligato.org> Change errs() to dbgs().

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
1c3436a67afcfaee5f972836ff1ffff2985adce1 07-Dec-2009 Anton Korobeynikov <asl@math.spbu.ru> Truncate the arguments of llvm.frameaddress / llvm.returnaddress intrinsics from i32 to platform's largest native type

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90741 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
36236b76a45be2a50315d1926c49bd3c63786b49 04-Dec-2009 Duncan Sands <baldrick@free.fr> Add note about a subtle bug in this code. Does not effect the main
architectures that LLVM targets, because they don't use this code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
9993b88f06fd54c0be31d35f0970ada70a4c0439 03-Dec-2009 Duncan Sands <baldrick@free.fr> Fix ExpandShiftWithUnknownAmountBit, which was completely bogus.
Pointed out by Javier Martinez (who also provided a patch). Since
this logic is not used on (for example) x86, I guess nobody noticed.
Tested by generating SHL, SRL, SRA on various choices of i64 for all
possible shift amounts, and comparing with gcc. Since I did this on
x86-32, I had to force the use of ExpandShiftWithUnknownAmountBit.
What I'm saying here is that I don't have a testcase I can add to the
repository.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
4e918b2c8ca81edd63f6708e08835b2c14648615 23-Sep-2009 Dan Gohman <gohman@apple.com> Use getStoreSize() instead of getStoreSizeInBits()/8.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
8a55ce4a392f07ac1f3c183100ac591b7ad7c693 23-Sep-2009 Dan Gohman <gohman@apple.com> Rename several variables from EVT to more descriptive names, now that EVT
is also the name of their type, as declarations like "EVT EVT" look
really odd.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82654 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
fd87a544c00c2ca04ee23aae67bbcad4dc852a54 25-Jul-2009 Dan Gohman <gohman@apple.com> Convert a few more things to use raw_ostream.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
001dbfebcbbded8c8e74b19e838b50da2b6c6fb5 16-Jul-2009 Owen Anderson <resistor@mac.com> Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a number of issues in
our current context-passing stuff, which is also fixed here


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76089 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
aad3460086a1b29c55f7490c6d8743ea4e53f07d 11-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Use CreateStackStoreLoad helper in more places.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75320 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
8c899ee031481dbece5f111379a274c848cb5902 08-Jul-2009 Duncan Sands <baldrick@free.fr> Remove trailing whitespace. Reorder some methods
and cases alphabetically. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
a43a7aefd753fe7d6005cbebc9619268db4ae139 05-Jun-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Allow libcalls for i16 sdiv/udiv/rem operations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72941 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
4c9369df57a52cec5e1fc735e61a979766288074 04-Jun-2009 Dale Johannesen <dalej@apple.com> Fix FP_TO_UINT->i32 on ppc32 -mcpu=g5. This was
using Promote which won't work because i64 isn't
a legal type. It's easy enough to use Custom, but
then we have the problem that when the type
legalizer is promoting FP_TO_UINT->i16, it has no
way of telling it should prefer FP_TO_SINT->i32
to FP_TO_UINT->i32. I have uncomfortably hacked
this by making the type legalizer choose FP_TO_SINT
when both are Custom.
This fixes several regressions in the testsuite.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
874ae251c317788391f9c3f113957802d390a063 02-Jun-2009 Dale Johannesen <dalej@apple.com> Revert 72707 and 72709, for the moment.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72712 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
4150d83abe90a5da4ddf86433b7bf4329acfa57c 02-Jun-2009 Dale Johannesen <dalej@apple.com> Make the implicit inputs and outputs of target-independent
ADDC/ADDE use MVT::i1 (later, whatever it gets legalized to)
instead of MVT::Flag. Remove CARRY_FALSE in favor of 0; adjust
all target-independent code to use this format.

Most targets will still produce a Flag-setting target-dependent
version when selection is done. X86 is converted to use i32
instead, which means TableGen needs to produce different code
in xxxGenDAGISel.inc. This keys off the new supportsHasI1 bit
in xxxInstrInfo, currently set only for X86; in principle this
is temporary and should go away when all other targets have
been converted. All relevant X86 instruction patterns are
modified to represent setting and using EFLAGS explicitly. The
same can be done on other targets.

The immediate behavior change is that an ADC/ADD pair are no
longer tightly coupled in the X86 scheduler; they can be
separated by instructions that don't clobber the flags (MOV).
I will soon add some peephole optimizations based on using
other instructions that set the flags to feed into ADC.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72707 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
f43071beddb7ed5b2fd7d2f06c4130460616a13d 31-May-2009 Duncan Sands <baldrick@free.fr> Rename CustomLowerResults to CustomLowerNode, since
it is used both when a result is illegal and when an
operand is illegal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72658 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
c885165e664f3b465403e1b6ce57ba63f57c5f0c 20-Apr-2009 Bob Wilson <bob.wilson@apple.com> Revise my previous change 68996 as suggested by Duncan.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
6fb2168aaed06e4685d064b6f63dc4c668b42728 31-Mar-2009 Evan Cheng <evan.cheng@apple.com> Fully general expansion of integer shift of any size.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
aa9df0b0c3cef33514095bde2eedead986677955 18-Mar-2009 Mon P Wang <wangmp@apple.com> Added missing support for widening when splitting an unary op (PR3683)
and expanding a bit convert (PR3711). In both cases, we extract the
valid part of the widen vector and then do the conversion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67175 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
27759f41ca1c930e2860275c9ba2567a5890d7d2 04-Mar-2009 Eli Friedman <eli.friedman@gmail.com> PR3686: make the legalizer handle bitcast from i80 to x86 long double.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
de06470330260f5937e7ca558f5f5b3e171f2ee5 06-Feb-2009 Dale Johannesen <dalej@apple.com> Remove more non-DebugLoc versions of getNode.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
4be0bdf7c1162824927dd3de89e016ae4934d0d6 05-Feb-2009 Dale Johannesen <dalej@apple.com> Remove non-DebugLoc versions of getMergeValues, ZeroExtendInReg.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
f8d3ec2c5725a2010f11de4ba78f6127712a5fe7 04-Feb-2009 Dale Johannesen <dalej@apple.com> Check in file I forgot.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
7fb085871857134f8cbeb17499d4ab771ba8da42 02-Feb-2009 Duncan Sands <baldrick@free.fr> Remove trailing spaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63540 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
55467af31620c9d027e071ebcd9746b7593cff17 02-Feb-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Duncan's patch. Further to 64382. Takes care of illegal types for shift amount.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
c82bf9b268eb63f7cf6f435d9ea222ddb8e3c5a8 02-Feb-2009 Mon P Wang <wangmp@apple.com> Preserve more SourceValue information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63498 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
786fd4dded6a42561c0d82bbd9d13b9a4d8d9675 31-Jan-2009 Dale Johannesen <dalej@apple.com> Propagate debug info. This file complete
(modulo bugs)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63457 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
c8fc99d66a03dc603f49d653937ad1d94e833006 31-Jan-2009 Dale Johannesen <dalej@apple.com> Propagate debug info through MakeLibCall and a
couple of things that use it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63456 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
f7eef6811c8b701b815c64e754a174691953a35f 28-Jan-2009 Mon P Wang <wangmp@apple.com> Fixed extract element when the result needs to be promoted and the input widened.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63217 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
9fbc7e2e7a765298fb4326885b407e0962f7ab62 21-Jan-2009 Duncan Sands <baldrick@free.fr> Cleanup whitespace and comments, and tweak some
prototypes, in operand type legalization. No
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62680 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
bb326bbe88d0b243d5d9d224308eb0c028d4d4af 21-Jan-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Allow targets to legalize operations (with illegal operands) that produces multiple values. For example, a load with an illegal operand (a load produces two values, a value and chain).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
15c94d08ab2be2e3d00de4edbfc7adde6545a7db 18-Jan-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Few targets like PIC16 wants libcall generation for illegal type i16.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
042fb3199f480cd8096d9c51ba1aceecd9af6f0e 13-Jan-2009 Duncan Sands <baldrick@free.fr> Correct a comment - this is not a sign extension.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
b6e223a9e806921183da972253c49082a2e07944 01-Jan-2009 Duncan Sands <baldrick@free.fr> Factorize (and generalize) the code promoting SELECT
and BRCOND conditions. Reorder a few methods while
there.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
28dc98f7521933872b93156e3ebf5c9f8327b2b3 17-Dec-2008 Eli Friedman <eli.friedman@gmail.com> Fix for PR3225: disable a broken optimization in
DAGTypeLegalizer::ExpandShiftWithKnownAmountBit.

In terms of restoring the optimization, the best fix here isn't
obvious... any ideas?



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61119 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
d17c0302763cfd0b3f6657d2493147552762ac07 15-Dec-2008 Mon P Wang <wangmp@apple.com> Added support to LegalizeType for expanding the operands of scalar to vector
and insert vector element. Modified extract vector element to extend the
result to match the expected promoted type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
c5d64607c96d9237f55988736e6ba7cc6a3d0a67 13-Dec-2008 Mon P Wang <wangmp@apple.com> Remove assertion to allow promotion of a truncating store operand


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60975 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
ab0c578bfd1380326830180a9209df6c5be58887 10-Dec-2008 Duncan Sands <baldrick@free.fr> For amusement, implement SADDO, SSUBO, UADDO, USUBO
for promoted integer types, eg: i16 on ppc-32, or
i24 on any platform. Complete support for arbitrary
precision integers would require handling expanded
integer types, eg: i128, but I couldn't be bothered.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
47d9dcc584cdb7fd645ca1d5c2a0ce363570aeb7 09-Dec-2008 Duncan Sands <baldrick@free.fr> Fix PR3117: not all nodes being legalized. The
essential problem was that the DAG can contain
random unused nodes which were never analyzed.
When remapping a value of a node being processed,
such a node may become used and need to be analyzed;
however due to operands being transformed during
analysis the node may morph into a different one.
Users of the morphing node need to be updated, and
this wasn't happening. While there I added a bunch
of documentation and sanity checks, so I (or some
other poor soul) won't have to scratch their head
over this stuff so long trying to remember how it
was all supposed to work next time some obscure
problem pops up! The extra sanity checking exposed
a few places where invariants weren't being preserved,
so those are fixed too. Since some of the sanity
checking is expensive, I added a flag to turn it
on. It is also turned on when building with
ENABLE_EXPENSIVE_CHECKS=1.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
03228089d5235f8c90477f88809139464e9c6ea5 23-Nov-2008 Duncan Sands <baldrick@free.fr> Rename SetCCResultContents to BooleanContents. In
practice these booleans are mostly produced by SetCC,
however the concept is more general.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59911 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
253174bf50c932abaa680f465e2888c0e5272267 22-Nov-2008 Bill Wendling <isanbard@gmail.com> Cleanup of the [SU]ADDO type legalization code. Patch by Duncan!

"It simplifies the type legalization part a bit, and produces better code by
teaching SelectionDAG about the extra bits in an i8 SADDO/UADDO node. In
essence, I spontaneously decided that on x86 this i8 boolean result would be
either 0 or 1, and on other platforms 0/1 or 0/-1, depending on whether the
platform likes it's boolean zero extended or sign extended."


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
9a6b92de4c2207b427f3b9cd67cd122dafc5b6c6 18-Nov-2008 Duncan Sands <baldrick@free.fr> Remove integer promotion support for FP_EXTEND
and FP_ROUND. Not sure what these were doing
here - probably they were sometimes (wrongly)
created with integer operands somewhere that
has since been fixed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
c08468774b65dc288c44076d428f4beddabe58e2 18-Nov-2008 Duncan Sands <baldrick@free.fr> Simplify code using helper routines. There is not
supposed to be any functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
104de6cf7b80ec5e9beb502a069f376810a0a1e3 17-Nov-2008 Richard Osborne <richard@xmos.com> Don't produce ADDC/ADDE when expanding SHL unless they are legal
for the target. This fixes PR3080.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
28088d3c049017a131aa7b07201c6e19c0227cef 17-Nov-2008 Mon P Wang <wangmp@apple.com> Fixed legalization of CONVERT_RNDSAT for integers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59432 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
245146b58a2188eb69bcb34fc2bdf57ebbcfb278 12-Nov-2008 Duncan Sands <baldrick@free.fr> Correct some thinkos in the expansion of ADD/SUB
when the target does not support ADDC/SUBC. This
fixes PR3044.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
00ec49b6bafc33ee17d97ec1c723e1edb41d4c97 11-Nov-2008 Mon P Wang <wangmp@apple.com> Cleaned up and fix bugs in convert_rndsat node


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
cff50d9e20d7bbc3acf4845fe826bfb3095126c4 10-Nov-2008 Duncan Sands <baldrick@free.fr> Tweak some comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58993 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
6959b2bb6521baca57e5507ca039e51002d4a971 10-Nov-2008 Duncan Sands <baldrick@free.fr> Small cleanups. No functionality change intended!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
a29c13086a3add78a3a79f744573fe09eaa9dc88 10-Nov-2008 Duncan Sands <baldrick@free.fr> When promoting the result of fp_to_uint/fp_to_sint,
inform the optimizers that the result must be zero/
sign extended from the smaller type. For example,
if a fp to unsigned i16 is promoted to fp to i32,
then we are allowed to assume that the extra 16 bits
are zero (because the result of fp to i16 is undefined
if the result does not fit in an i16). This is
quite aggressive, but should help the optimizers
produce better code. This requires correcting a
test which thought that fp_to_uint is some kind
of truncation, which it is not: in the testcase
(which does fp to i1), either the fp value converts
to 0 or 1 or the result is undefined, which is
quite different to truncation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
47b3417cf0d90724f9dab71aae4c7204e46847b6 07-Nov-2008 Duncan Sands <baldrick@free.fr> Sign-extend rather than zero-extend when promoting
the condition for a BRCOND, according to what is
returned by getSetCCResultContents. Since all
targets return the same thing (ZeroOrOneSetCCResult),
this should be harmless! The point is that all over
the place the result of SETCC is fed directly into
BRCOND. On machines for which getSetCCResultContents
returns ZeroOrNegativeOneSetCCResult, this is a
sign-extended boolean. So it seems dangerous to
also feed BRCOND zero-extended booleans in some
circumstances - for example, when promoting the
condition.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58861 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
d821726a91000c1b2de7ca8aafdc27b1a311741b 03-Nov-2008 Duncan Sands <baldrick@free.fr> Make VAARG promotion work correctly with large funky
sized integers like i129, and also reduce the number
of assumptions made about how vaarg is implemented.
This still doesn't work correctly for small integers
like (eg) i1 on x86, since x86 passes each of them
(essentially an i8) in a 4 byte stack slot, so the
pointer needs to be advanced by 4 bytes not by 1 byte
as now. But this is no longer a LegalizeTypes problem
(it was also wrong in LT before): it is a bug in the
operation expansion in LegalizeDAG: now LegalizeTypes
turns an i1 vaarg into an i8 vaarg which would work
fine if only the i8 vaarg was turned into correct code
later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
21c2972f7d24680f6475877a3398b7f8cf515b33 29-Oct-2008 Duncan Sands <baldrick@free.fr> Fix PR2977: LegalizeTypes support for expanding
VAARG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58379 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
b3bc6352defdf1a5c6b1b0770d0c4d603f6524a8 29-Oct-2008 Duncan Sands <baldrick@free.fr> Fix 80 column violations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
ee4c619b3b28a42078fc8033e5dccd42fc6edd42 23-Oct-2008 Duncan Sands <baldrick@free.fr> Fix thinko - the operand number has nothing to do
with the result number.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58041 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
f9410141f703f4e8a6aba717617ef958249f6d13 22-Oct-2008 Duncan Sands <baldrick@free.fr> Be nice to CellSPU: for this target getSetCCResultType
may return i8, which can result in SELECT nodes for
which the type of the condition is i8, but there are
no patterns for select with i8 condition. Tweak the
LegalizeTypes logic to avoid this as much as possible.
This isn't a real fix because it is still perfectly
possible to end up with such select nodes - CellSPU
needs to be fixed IMHO.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
29a2822f287275a0d4df49f98104409d8f97c5df 22-Oct-2008 Duncan Sands <baldrick@free.fr> Port from LegalizeDAG the logic to only generate
ADDC/ADDE/SUBC/SUBE if the target supports it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
3b521d5acccf4fecdb1aea878180df6dc29553dc 22-Oct-2008 Duncan Sands <baldrick@free.fr> Add some comments explaining the meaning of a boolean
that is not of type MVT::i1 in SELECT and SETCC nodes.
Relax the LegalizeTypes SELECT condition promotion
sanity checks to allow other condition types than i1.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
b5f68e241f9eb19e5694131df830acbfce20a6eb 20-Oct-2008 Duncan Sands <baldrick@free.fr> LegalizeTypes support for atomic operation promotion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
49c18cce976c158e86f54c681dff21bb81640fb8 20-Oct-2008 Duncan Sands <baldrick@free.fr> Use DAG.getIntPtrConstant rather than DAG.getConstant
with TLI.getPointerTy for a small simplification.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
7e4982287591945c4e42ba8470a978e629789c76 20-Oct-2008 Duncan Sands <baldrick@free.fr> Always use either MVT::i1 or getSetCCResultType for
the condition of a SELECT node. Make sure that the
correct extension type (any-, sign- or zero-extend)
is used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
ef5b199905cee0b78eb30cd44836e5b6ca5cbd09 20-Oct-2008 Duncan Sands <baldrick@free.fr> Formatting - no functional change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
f6e29499ac036821e7f84e264663c24888d68c78 20-Oct-2008 Duncan Sands <baldrick@free.fr> Don't use a random type for the select condition,
use an MVT::i1 and simplify the code while there.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
e47561ccff9c7a76f9392b26ae6202e30f1247ed 03-Oct-2008 Duncan Sands <baldrick@free.fr> The result of getSetCCResultType (eg: i32) may be larger
than the type an i1 is promoted to (eg: i8). Account
for this. Noticed by Tilmann Scheller on CellSPU; he
will hopefully take care of fixing this in LegalizeDAG
and adding a testcase!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56997 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
95db39a9de48f69f4d764335b492b83a698c7854 16-Jul-2008 Duncan Sands <baldrick@free.fr> Add support for promoting and expanding AssertZext
and AssertSext. Needed when passing huge integer
parameters with the zeroext or signext attributes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
05c397d52a145c8844790d6491c4c51d4bbfed7c 16-Jul-2008 Duncan Sands <baldrick@free.fr> Reorder methods alphabetically. No functionality change.
While this is not a wonderful organizing principle, it
does make it easy to find routines, and clear where to
insert new ones.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
c07e6e53f757da1a7c79c66ed53f2844de85a77e 15-Jul-2008 Duncan Sands <baldrick@free.fr> LegalizeTypes support for promotion of bswap.
In LegalizeDAG the value is zero-extended to
the new type before byte swapping. It doesn't
matter how the extension is done since the new
bits are shifted off anyway after the swap, so
extend by any old rubbish bits. This results
in the final assembler for the testcase being
one line shorter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53604 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
8d56a6f4d8b010d4c582225a08ece971613f6fe3 15-Jul-2008 Duncan Sands <baldrick@free.fr> LegalizeTypes support for promotion of SIGN_EXTEND_INREG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
bf304c20651b80309af4c0fb3a14c0d73eaa984f 15-Jul-2008 Duncan Sands <baldrick@free.fr> Reorder the integer promotion methods alphabetically.
No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
ac6cecec189ba9689c42543c3106c02b96d788da 11-Jul-2008 Duncan Sands <baldrick@free.fr> It is pointless to turn a UINT_TO_FP into an
SINT_TO_FP libcall plus additional operations:
it might as well be a direct UINT_TO_FP libcall.
So only turn it into an SINT_TO_FP if the target
has special handling for SINT_TO_FP.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53461 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
9bed0f58eb7f5e9e22d062f3880a5fabfdd0dfdd 11-Jul-2008 Duncan Sands <baldrick@free.fr> Add two missing SINT_TO_FP libcalls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
edfba7e707a4f2f2e800843a7ef980c27d7f4eff 11-Jul-2008 Duncan Sands <baldrick@free.fr> Port a shift-by-1 optimization from LegalizeDAG: it
was presumably added after the rest of the code was
copied to LegalizeTypes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
dddc6291fb5274282a20d5923b50535d456d34a4 11-Jul-2008 Duncan Sands <baldrick@free.fr> Add support for 128 bit shifts and 32 bit shifts
on 16 bit machines.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53458 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
5ac319ac7125b009adddcc49294d2e040c4a91e5 10-Jul-2008 Duncan Sands <baldrick@free.fr> Add support for 128 bit multiplicative operations.
Lack of these caused a bootstrap failure with Fortran
on x86-64 with LegalizeTypes turned on. While there,
be nice to 16 bit machines and support expansion of
i32 too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
03dc093a2e63d20984c8fd67809fa762f1e31f1a 10-Jul-2008 Duncan Sands <baldrick@free.fr> Fix a FIXME: use an apint in CTTZ legalization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
ae099d54428f4113f8a71c53314975fb8a8e8bbc 10-Jul-2008 Duncan Sands <baldrick@free.fr> Remove PromoteIntRes_FP_ROUND - not sure what it
was doing there: FP_ROUND returns a float, not an
integer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53405 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
f4e4629ee8c218f892ad8ae3e182fe40bc160895 10-Jul-2008 Duncan Sands <baldrick@free.fr> Make the LegalizeType method naming scheme more regular.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53403 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
dd1c20d2580236280694a22264fa26b36cb8fbe6 09-Jul-2008 Duncan Sands <baldrick@free.fr> Remove some unneeded includes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
7ba11c552b8a25ad1272b44d96e886a784dae0b7 08-Jul-2008 Duncan Sands <baldrick@free.fr> Remove custom expansion from LegalizeTypes when doing
soft float: experiments show that targets aren't
expecting this for results or for operands. Add
support select/select_cc result soft float and
correct operand soft float for these.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53245 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.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/LegalizeIntegerTypes.cpp
d3ca9fc9984d036146886a40ad3f73aaf7a424eb 30-Jun-2008 Duncan Sands <baldrick@free.fr> Support for VAARG. As noted in a comment, this is
wrong for types like x86 long double and i1, but
no worse than what is done in LegalizeDAG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
7fc8ab81f5f46dcba0f76b1c546a1d11ccbebe26 30-Jun-2008 Duncan Sands <baldrick@free.fr> Support for promoting select_cc operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
11ac797f5ed142f11aafde3dd76c28a73d84282e 25-Jun-2008 Duncan Sands <baldrick@free.fr> Add/complete support for integer and float
select_cc and friends. This code could be
factorized a bit but I'm not sure that it's
worth it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
e9c80f4d576bf1ff682958d447c1a60fa9348da3 23-Jun-2008 Duncan Sands <baldrick@free.fr> Port some integer multiplication fixes from LegalizeDAG.
Bail out with an error if there is no libcall available
for the given size of integer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
4a307ecce68f90e0eebf1ded52b947816cdc2304 23-Jun-2008 Duncan Sands <baldrick@free.fr> Support for expanding the result of EXTRACT_ELEMENT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
ab09b7e8f34075c1759127a113f41bdf921f4034 23-Jun-2008 Duncan Sands <baldrick@free.fr> Cleanup up LegalizeTypes handling of loads and
stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
a1ace76c70ae5332d6f33fce5c0c1e2fdb8cca11 21-Jun-2008 Duncan Sands <baldrick@free.fr> Support for load/store of expanded float types. I
don't know if a truncating store is possible here,
but added support for it anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
78cd649ad326f79a1f8424ca2b63cea3239a9a52 20-Jun-2008 Duncan Sands <baldrick@free.fr> Share some code that is common between integer and
float expansion (and sometimes vector splitting too).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
4fc4fd657d4266059dac3849133a3a351b03d99d 20-Jun-2008 Duncan Sands <baldrick@free.fr> Rename the operation of turning a float type into an
integer of the same type. Before it was "promotion",
but this is confusing because it is quite different
to promotion of integers. Call it "softening" instead,
inspired by "soft float".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52546 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
69b01e92a29ce6d7e435171aeea3fbc987b81586 17-Jun-2008 Duncan Sands <baldrick@free.fr> Split type expansion into ExpandInteger and ExpandFloat
rather than bundling them together. Rename FloatToInt
to PromoteFloat (better, if not perfect). Reorganize
files by types rather than by operations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp