Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								61c574fc51 
								
							 
						 
						
							
							
								
								ppc long double.  Implement fabs and fneg.  
							
							 
							
							... 
							
							
							
							llvm-svn: 42924 
							
						 
						
							2007-10-12 19:02:17 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								a1a4a9ebfa 
								
							 
						 
						
							
							
								
								Implement i64->ppcf128 conversions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 42919 
							
						 
						
							2007-10-12 17:52:03 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								4f056f3c10 
								
							 
						 
						
							
							
								
								Add support to SplitVectorOp for powi, where the second operand  
							
							 
							
							... 
							
							
							
							is a scalar integer.
llvm-svn: 42906 
							
						 
						
							2007-10-12 14:13:46 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								05ff9e8cda 
								
							 
						 
						
							
							
								
								PPC long double.  Implement a couple more conversions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 42888 
							
						 
						
							2007-10-12 01:37:08 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								2a7de41682 
								
							 
						 
						
							
							
								
								Codegen support for vector intrinsics.  
							
							 
							
							... 
							
							
							
							Factor out the code that expands the "nasty scalar code" for unrolling
vectors into a separate routine, teach it how to handle mixed
vector/scalar operands, as seen in powi, and use it for several operators,
including sin, cos, powi, and pow.
Add support in SplitVectorOp for fpow, fpowi and for several unary
operators.
llvm-svn: 42884 
							
						 
						
							2007-10-11 23:57:53 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								6472eb63c2 
								
							 
						 
						
							
							
								
								Implement ppc long double->uint conversion.  
							
							 
							
							... 
							
							
							
							Make ppc long double constants print.
llvm-svn: 42882 
							
						 
						
							2007-10-11 23:32:15 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								007aa378ad 
								
							 
						 
						
							
							
								
								Next PPC long double bits.  First cut at constants.  
							
							 
							
							... 
							
							
							
							No compile-time support for constant operations yet,
just format transformations.  Make readers and
writers work.  Split constants into 2 doubles in
Legalize.
llvm-svn: 42865 
							
						 
						
							2007-10-11 18:07:22 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								666323eacd 
								
							 
						 
						
							
							
								
								Next PPC long double bits: ppcf128->i32 conversion.  
							
							 
							
							... 
							
							
							
							Surprisingly complicated.
Adds getTargetNode for 2 outputs, no inputs (missing).
llvm-svn: 42822 
							
						 
						
							2007-10-10 01:01:31 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								a160361c85 
								
							 
						 
						
							
							
								
								Migrate X86 and ARM from using X86ISD::{,I}DIV and ARMISD::MULHILO{U,S} to  
							
							 
							
							... 
							
							
							
							use ISD::{S,U}DIVREM and ISD::{S,U}MUL_HIO. Move the lowering code
associated with these operators into target-independent in LegalizeDAG.cpp
and TargetLowering.cpp.
llvm-svn: 42762 
							
						 
						
							2007-10-08 18:33:35 +00:00  
						
					 
				
					
						
							
							
								 
								Neil Booth
							
						 
						
							 
							
							
							
							
								
							
							
								5f00973393 
								
							 
						 
						
							
							
								
								convertFromInteger, as originally written, expected sign-extended  
							
							 
							
							... 
							
							
							
							input.  APInt unfortunately zero-extends signed integers, so Dale
modified the function to expect zero-extended input.  Make this
assumption explicit in the function name.
llvm-svn: 42732 
							
						 
						
							2007-10-07 11:45:55 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								f864ac96d8 
								
							 
						 
						
							
							
								
								Next powerpc long double bits.  Comparisons work,  
							
							 
							
							... 
							
							
							
							although not well, and shortening FP converts.
llvm-svn: 42672 
							
						 
						
							2007-10-06 01:24:11 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								c0154c06d6 
								
							 
						 
						
							
							
								
								First round of ppc long double.  call/return and  
							
							 
							
							... 
							
							
							
							basic arithmetic works.
Rename RTLIB long double functions to distinguish
different flavors of long double; the lib functions
have different names, alas.
llvm-svn: 42644 
							
						 
						
							2007-10-05 20:04:43 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								12334acbfb 
								
							 
						 
						
							
							
								
								Legalize support for MUL_LOHI and DIVREM.  
							
							 
							
							... 
							
							
							
							llvm-svn: 42636 
							
						 
						
							2007-10-05 14:17:22 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								fd11ef4665 
								
							 
						 
						
							
							
								
								Silence a warning.  
							
							 
							
							... 
							
							
							
							llvm-svn: 42619 
							
						 
						
							2007-10-05 01:09:32 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								9150652b21 
								
							 
						 
						
							
							
								
								Constant fold int-to-long-double conversions;  
							
							 
							
							... 
							
							
							
							use APFloat for int-to-float/double; use
round-to-nearest for these (implementation-defined,
seems to match gcc).
llvm-svn: 42484 
							
						 
						
							2007-09-30 18:19:03 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								a90183e7d1 
								
							 
						 
						
							
							
								
								Teach SplitVectorOp how to split INSERT_VECTOR_ELT.  
							
							 
							
							... 
							
							
							
							llvm-svn: 42457 
							
						 
						
							2007-09-28 23:53:40 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								789b5a505b 
								
							 
						 
						
							
							
								
								Fix long double -> uint64 conversion.  
							
							 
							
							... 
							
							
							
							llvm-svn: 42440 
							
						 
						
							2007-09-28 18:44:17 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								25a00a63eb 
								
							 
						 
						
							
							
								
								Add sqrt and powi intrinsics for long double.  
							
							 
							
							... 
							
							
							
							llvm-svn: 42423 
							
						 
						
							2007-09-28 01:08:20 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								75439b3b78 
								
							 
						 
						
							
							
								
								Silence a compiler warning.  
							
							 
							
							... 
							
							
							
							llvm-svn: 42389 
							
						 
						
							2007-09-27 07:35:39 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								f04d37d3a9 
								
							 
						 
						
							
							
								
								Fix f80 UNDEF.  
							
							 
							
							... 
							
							
							
							llvm-svn: 42359 
							
						 
						
							2007-09-26 17:26:49 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								6002818999 
								
							 
						 
						
							
							
								
								Use the correct result value type instead of using getValueType(0)  
							
							 
							
							... 
							
							
							
							in ExpandEXTRACT_VECTOR_ELT and SplitVectorOp. This fixes an abort
in the included testcase.
llvm-svn: 42264 
							
						 
						
							2007-09-24 15:54:53 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								4230512f32 
								
							 
						 
						
							
							
								
								Change APFloat::convertFromInteger to take the incoming  
							
							 
							
							... 
							
							
							
							bit width instead of number of words allocated, which
makes it actually work for int->APF conversions.
Adjust callers.  Add const to one of the APInt constructors
to prevent surprising match when called with const
argument.
llvm-svn: 42210 
							
						 
						
							2007-09-21 22:09:37 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								7d67e547b5 
								
							 
						 
						
							
							
								
								More long double fixes.  x86_64 should build now.  
							
							 
							
							... 
							
							
							
							llvm-svn: 42155 
							
						 
						
							2007-09-19 23:55:34 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								b59d25fe54 
								
							 
						 
						
							
							
								
								Fix longdouble -> uint conversion.  
							
							 
							
							... 
							
							
							
							llvm-svn: 42143 
							
						 
						
							2007-09-19 17:53:26 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								7f724e9b94 
								
							 
						 
						
							
							
								
								Adjust per revew comments.  
							
							 
							
							... 
							
							
							
							llvm-svn: 42002 
							
						 
						
							2007-09-16 16:51:49 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								98d3a08d8f 
								
							 
						 
						
							
							
								
								Remove the assumption that FP's are either float or  
							
							 
							
							... 
							
							
							
							double from some of the many places in the optimizers
it appears, and do something reasonable with x86
long double.
Make APInt::dump() public, remove newline, use it to
dump ConstantSDNode's.
Allow APFloats in FoldingSet.
Expand X86 backend handling of long doubles (conversions
to/from int, mostly).
llvm-svn: 41967 
							
						 
						
							2007-09-14 22:26:36 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								028084efe5 
								
							 
						 
						
							
							
								
								Revise previous patch per review comments.  
							
							 
							
							... 
							
							
							
							Next round of x87 long double stuff.
Getting close now, basically works.
llvm-svn: 41875 
							
						 
						
							2007-09-12 03:30:33 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								245dceb06d 
								
							 
						 
						
							
							
								
								Add APInt interfaces to APFloat (allows directly  
							
							 
							
							... 
							
							
							
							access to bits).  Use them in place of float and
double interfaces where appropriate.
First bits of x86 long double constants handling 
(untested, probably does not work).
llvm-svn: 41858 
							
						 
						
							2007-09-11 18:32:33 +00:00  
						
					 
				
					
						
							
							
								 
								Duncan Sands
							
						 
						
							 
							
							
							
							
								
							
							
								86e0119822 
								
							 
						 
						
							
							
								
								Fold the adjust_trampoline intrinsic into  
							
							 
							
							... 
							
							
							
							init_trampoline.  There is now only one
trampoline intrinsic.
llvm-svn: 41841 
							
						 
						
							2007-09-11 14:10:23 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								29e6ac4281 
								
							 
						 
						
							
							
								
								Implement misaligned FP loads and stores.  
							
							 
							
							... 
							
							
							
							llvm-svn: 41786 
							
						 
						
							2007-09-08 19:29:23 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								d246b2ca5c 
								
							 
						 
						
							
							
								
								Change LegalFPImmediates to use APFloat.  
							
							 
							
							... 
							
							
							
							Add APFloat interfaces to ConstantFP, SelectionDAG.
Fix integer bit in double->APFloat conversion.
Convert LegalizeDAG to use APFloat interface in
ConstantFPSDNode uses.
llvm-svn: 41587 
							
						 
						
							2007-08-30 00:23:21 +00:00  
						
					 
				
					
						
							
							
								 
								Anton Korobeynikov
							
						 
						
							 
							
							
							
							
								
							
							
								2bdec2a5ee 
								
							 
						 
						
							
							
								
								Fix use of declaration inside case block  
							
							 
							
							... 
							
							
							
							llvm-svn: 41584 
							
						 
						
							2007-08-29 23:18:48 +00:00  
						
					 
				
					
						
							
							
								 
								Anton Korobeynikov
							
						 
						
							 
							
							
							
							
								
							
							
								830b1cb4e9 
								
							 
						 
						
							
							
								
								Lower FRAME_TO_ADDR_OFFSET to zero by default (if not custom lowered)  
							
							 
							
							... 
							
							
							
							llvm-svn: 41578 
							
						 
						
							2007-08-29 19:28:29 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2ed652f11d 
								
							 
						 
						
							
							
								
								Allow target constants to be illegal types.  The target should  
							
							 
							
							... 
							
							
							
							know how to handle them.  This fixes 
test/CodeGen/Generic/asm-large-immediate.ll
llvm-svn: 41388 
							
						 
						
							2007-08-25 01:00:22 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								cb6d65e1bf 
								
							 
						 
						
							
							
								
								Avoid issue on 64-bit hosts.  
							
							 
							
							... 
							
							
							
							llvm-svn: 41143 
							
						 
						
							2007-08-17 18:02:22 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								631ccc6144 
								
							 
						 
						
							
							
								
								If dynamic_stackalloc alignment is > stack alignment, first issue an instruction to align the stack ptr before the decrement.  
							
							 
							
							... 
							
							
							
							llvm-svn: 41133 
							
						 
						
							2007-08-16 23:50:06 +00:00  
						
					 
				
					
						
							
							
								 
								Lauro Ramos Venancio
							
						 
						
							 
							
							
							
							
								
							
							
								a392cd2fde 
								
							 
						 
						
							
							
								
								Implement FPOWI ExpandOp.  
							
							 
							
							... 
							
							
							
							Fix PR1287.
llvm-svn: 41112 
							
						 
						
							2007-08-15 22:13:27 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								c339e45274 
								
							 
						 
						
							
							
								
								Update per review comments.  
							
							 
							
							... 
							
							
							
							llvm-svn: 40965 
							
						 
						
							2007-08-09 17:27:48 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								ba1a98a4e0 
								
							 
						 
						
							
							
								
								long double 9 of N.  This finishes up the X86-32 bits  
							
							 
							
							... 
							
							
							
							(constants are still not handled).  Adds ConvertActions
to control fp-to-fp conversions (these are currently
defaulted for all other targets, so no changes there).
llvm-svn: 40958 
							
						 
						
							2007-08-09 01:04:01 +00:00  
						
					 
				
					
						
							
							
								 
								Scott Michel
							
						 
						
							 
							
							
							
							
								
							
							
								9d09c5ccda 
								
							 
						 
						
							
							
								
								If a target really needs to custom lower constants, it should be allowed  
							
							 
							
							... 
							
							
							
							to do so.
llvm-svn: 40955 
							
						 
						
							2007-08-08 23:23:31 +00:00  
						
					 
				
					
						
							
							
								 
								Scott Michel
							
						 
						
							 
							
							
							
							
								
							
							
								5b80ecbcf5 
								
							 
						 
						
							
							
								
								Style police: Expand the tabs to spaces!  
							
							 
							
							... 
							
							
							
							llvm-svn: 40712 
							
						 
						
							2007-08-02 02:22:46 +00:00  
						
					 
				
					
						
							
							
								 
								Lauro Ramos Venancio
							
						 
						
							 
							
							
							
							
								
							
							
								0db4418a5f 
								
							 
						 
						
							
							
								
								Expand unaligned loads/stores when the target doesn't support them. (PR1548)  
							
							 
							
							... 
							
							
							
							llvm-svn: 40682 
							
						 
						
							2007-08-01 19:34:21 +00:00  
						
					 
				
					
						
							
							
								 
								Scott Michel
							
						 
						
							 
							
							
							
							
								
							
							
								34e2d22d63 
								
							 
						 
						
							
							
								
								- Allow custom lowering for CTPOP, CTTZ, CTLZ.  
							
							 
							
							... 
							
							
							
							- Fixed an existing unexpanded tab.
llvm-svn: 40605 
							
						 
						
							2007-07-30 21:00:31 +00:00  
						
					 
				
					
						
							
							
								 
								Duncan Sands
							
						 
						
							 
							
							
							
							
								
							
							
								644f917358 
								
							 
						 
						
							
							
								
								Support for trampolines, except for X86 codegen which is  
							
							 
							
							... 
							
							
							
							still under discussion.
llvm-svn: 40549 
							
						 
						
							2007-07-27 12:58:54 +00:00  
						
					 
				
					
						
							
							
								 
								Christopher Lamb
							
						 
						
							 
							
							
							
							
								
							
							
								a8fc0e527b 
								
							 
						 
						
							
							
								
								Add selection DAG nodes for subreg insert/extract. PR1350  
							
							 
							
							... 
							
							
							
							llvm-svn: 40516 
							
						 
						
							2007-07-26 07:34:40 +00:00  
						
					 
				
					
						
							
							
								 
								Christopher Lamb
							
						 
						
							 
							
							
							
							
								
							
							
								3fead96121 
								
							 
						 
						
							
							
								
								Fix infinite recursion for when extract_vector_elt is legal. Unfortunately no public targets use this code-path, so no test.  
							
							 
							
							... 
							
							
							
							llvm-svn: 40510 
							
						 
						
							2007-07-26 03:33:13 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								06c60b6032 
								
							 
						 
						
							
							
								
								Fix comments about vectors to use the current wording.  
							
							 
							
							... 
							
							
							
							llvm-svn: 39921 
							
						 
						
							2007-07-16 14:29:03 +00:00  
						
					 
				
					
						
							
							
								 
								Nick Lewycky
							
						 
						
							 
							
							
							
							
								
							
							
								d20f485866 
								
							 
						 
						
							
							
								
								Fix the build. Patch from Holger Schurig.  
							
							 
							
							... 
							
							
							
							llvm-svn: 39856 
							
						 
						
							2007-07-14 15:11:14 +00:00  
						
					 
				
					
						
							
							
								 
								Anton Korobeynikov
							
						 
						
							 
							
							
							
							
								
							
							
								383a324735 
								
							 
						 
						
							
							
								
								Long live the exception handling!  
							
							 
							
							... 
							
							
							
							This patch fills the last necessary bits to enable exceptions
handling in LLVM. Currently only on x86-32/linux.
In fact, this patch adds necessary intrinsics (and their lowering) which
represent really weird target-specific gcc builtins used inside unwinder.
After corresponding llvm-gcc patch will land (easy) exceptions should be
more or less workable. However, exceptions handling support should not be 
thought as 'finished': I expect many small and not so small glitches
everywhere.
llvm-svn: 39855 
							
						 
						
							2007-07-14 14:06:15 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								ff72788863 
								
							 
						 
						
							
							
								
								Fix the comment for LegalizeOp to more accurately reflect what it does.  
							
							 
							
							... 
							
							
							
							llvm-svn: 39827 
							
						 
						
							2007-07-13 20:14:11 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								32aad49b24 
								
							 
						 
						
							
							
								
								Move DenseMapKeyInfo<SDOperand> from LegalizeDAG.cpp to SelectionDAGNodes.h  
							
							 
							
							... 
							
							
							
							llvm-svn: 38484 
							
						 
						
							2007-07-10 06:59:55 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								2af3063337 
								
							 
						 
						
							
							
								
								Preserve volatililty and alignment information when lowering or  
							
							 
							
							... 
							
							
							
							simplifying loads and stores.
llvm-svn: 38473 
							
						 
						
							2007-07-09 22:18:38 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								a2b3c175db 
								
							 
						 
						
							
							
								
								Fix for PR 1505 (and 1489).  Rewrite X87 register  
							
							 
							
							... 
							
							
							
							model to include f32 variants.  Some factoring
improvments forthcoming.
llvm-svn: 37847 
							
						 
						
							2007-07-03 00:53:03 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								0de7694de6 
								
							 
						 
						
							
							
								
								Fix an assertion failure in legalizing bitcast operators on targets where  
							
							 
							
							... 
							
							
							
							vectors are split down to single elements as part of legalization.
llvm-svn: 37785 
							
						 
						
							2007-06-29 00:09:08 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								3b62d7265d 
								
							 
						 
						
							
							
								
								Rename ("shrinkify") MVT::isExtendedValueType to MVT::isExtendedVT.  
							
							 
							
							... 
							
							
							
							llvm-svn: 37758 
							
						 
						
							2007-06-27 16:08:04 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								f4e86da3a6 
								
							 
						 
						
							
							
								
								Make the comment for ScalarizeVectorOp mention that it is only for use  
							
							 
							
							... 
							
							
							
							with single-element vectors.
llvm-svn: 37752 
							
						 
						
							2007-06-27 14:06:22 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								a866514528 
								
							 
						 
						
							
							
								
								Generalize MVT::ValueType and associated functions to be able to represent  
							
							 
							
							... 
							
							
							
							extended vector types. Remove the special SDNode opcodes used for pre-legalize
vector operations, and the special MVT::Vector type used with them. Adjust
lowering and legalize to work with the normal SDNode kinds instead, and to
use the normal MVT functions to work with vector types instead of using the
two special operands that the pre-legalize nodes held.
This allows pre-legalize and post-legalize DAGs, and the code that operates
on them, to be more consistent. Pre-legalize vector operators can be handled
more consistently with scalar operators. And, -view-dag-combine1-dags and
-view-legalize-dags now look prettier for vector code.
llvm-svn: 37719 
							
						 
						
							2007-06-25 16:23:39 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								309d3d51b3 
								
							 
						 
						
							
							
								
								Move ComputeMaskedBits, MaskedValueIsZero, and ComputeNumSignBits from  
							
							 
							
							... 
							
							
							
							TargetLowering to SelectionDAG so that they have more convenient
access to the current DAG, in preparation for the ValueType routines
being changed from standalone functions to members of SelectionDAG for
the pre-legalize vector type changes.
llvm-svn: 37704 
							
						 
						
							2007-06-22 14:59:07 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								8e8d34b220 
								
							 
						 
						
							
							
								
								Tidy up ValueType names in comments.  
							
							 
							
							... 
							
							
							
							llvm-svn: 37688 
							
						 
						
							2007-06-21 14:48:26 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								e31adc8ab9 
								
							 
						 
						
							
							
								
								make ComputeTopDownOrdering significantly faster and use less stack space  
							
							 
							
							... 
							
							
							
							by making it non-recursive
llvm-svn: 37629 
							
						 
						
							2007-06-18 21:28:10 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								5c4413120f 
								
							 
						 
						
							
							
								
								Rename MVT::getVectorBaseType to MVT::getVectorElementType.  
							
							 
							
							... 
							
							
							
							llvm-svn: 37579 
							
						 
						
							2007-06-14 22:58:02 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								26455c4ae0 
								
							 
						 
						
							
							
								
								Introduce new SelectionDAG node opcodes VEXTRACT_SUBVECTOR and  
							
							 
							
							... 
							
							
							
							VCONCAT_VECTORS. Use these for CopyToReg and CopyFromReg legalizing in
the case that the full register is to be split into subvectors instead
of scalars. This replaces uses of VBIT_CONVERT to present values as
vector-of-vector types in order to make whole subvectors accessible via
BUILD_VECTOR and EXTRACT_VECTOR_ELT.
This is in preparation for adding extended ValueType values, where
having vector-of-vector types is undesirable.
llvm-svn: 37569 
							
						 
						
							2007-06-13 15:12:02 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								b4c2690446 
								
							 
						 
						
							
							
								
								Pass the DAG to SDNode::dump to let it do more detailed dumps in some cases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 37413 
							
						 
						
							2007-06-04 16:17:33 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								1796f1f8e9 
								
							 
						 
						
							
							
								
								Qualify several calls to functions in the MVT namespace, for consistency.  
							
							 
							
							... 
							
							
							
							llvm-svn: 37230 
							
						 
						
							2007-05-18 17:52:13 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2135bc08d6 
								
							 
						 
						
							
							
								
								add expand support for ADDC/SUBC/ADDE/SUBE so we can codegen 128-bit add/sub on 32-bit (or less) targets  
							
							 
							
							... 
							
							
							
							llvm-svn: 37168 
							
						 
						
							2007-05-17 18:15:41 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								07e6f3257c 
								
							 
						 
						
							
							
								
								Propagate alignment/volatility in two places.  
							
							 
							
							... 
							
							
							
							Implement support for expanding a bitcast from an illegal vector type to
a legal one (e.g. 4xi32 -> 4xf32 in SSE1).  This fixes PR1371 and
CodeGen/X86/2007-05-05-VecCastExpand.ll
llvm-svn: 36787 
							
						 
						
							2007-05-05 19:39:05 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								1deacd61f4 
								
							 
						 
						
							
							
								
								memory inputs to an inline asm are required to have an address available.  
							
							 
							
							... 
							
							
							
							If the operand is not already an indirect operand, spill it to a constant
pool entry or a stack slot.
This fixes PR1356 and CodeGen/X86/2007-04-27-InlineAsm-IntMemInput.ll
llvm-svn: 36536 
							
						 
						
							2007-04-28 06:42:38 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								1cbe208cda 
								
							 
						 
						
							
							
								
								Fix incorrect legalization of EHSELECTOR.  This fixes  
							
							 
							
							... 
							
							
							
							CodeGen/Generic/2007-04-14-EHSelectorCrash.ll and PR1326
llvm-svn: 36510 
							
						 
						
							2007-04-27 17:12:52 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								bf535fc8bd 
								
							 
						 
						
							
							
								
								Expand UINT_TO_FP in turns of SINT_TO_FP when UINTTOFP_* libcalls are not available.  
							
							 
							
							... 
							
							
							
							llvm-svn: 36501 
							
						 
						
							2007-04-27 07:33:31 +00:00  
						
					 
				
					
						
							
							
								 
								Lauro Ramos Venancio
							
						 
						
							 
							
							
							
							
								
							
							
								94314be0e0 
								
							 
						 
						
							
							
								
								Allow the lowering of ISD::GLOBAL_OFFSET_TABLE.  
							
							 
							
							... 
							
							
							
							llvm-svn: 36290 
							
						 
						
							2007-04-20 23:02:39 +00:00  
						
					 
				
					
						
							
							
								 
								Lauro Ramos Venancio
							
						 
						
							 
							
							
							
							
								
							
							
								2518889872 
								
							 
						 
						
							
							
								
								Implement "general dynamic", "initial exec" and "local exec" TLS models for  
							
							 
							
							... 
							
							
							
							X86 32 bits.
llvm-svn: 36283 
							
						 
						
							2007-04-20 21:38:10 +00:00  
						
					 
				
					
						
							
							
								 
								Scott Michel
							
						 
						
							 
							
							
							
							
								
							
							
								16627a542f 
								
							 
						 
						
							
							
								
								1. Insert custom lowering hooks for ISD::ROTR and ISD::ROTL.  
							
							 
							
							... 
							
							
							
							2. Help DAGCombiner recognize zero/sign/any-extended versions of ROTR and ROTL
patterns. This was motivated by the X86/rotate.ll testcase, which should now
generate code for other platforms (and soon-to-come platforms.) Rewrote code
slightly to make it easier to read.
llvm-svn: 35605 
							
						 
						
							2007-04-02 21:36:32 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2a991268f7 
								
							 
						 
						
							
							
								
								don't rely on ADL  
							
							 
							
							... 
							
							
							
							llvm-svn: 35299 
							
						 
						
							2007-03-24 17:37:03 +00:00  
						
					 
				
					
						
							
							
								 
								Anton Korobeynikov
							
						 
						
							 
							
							
							
							
								
							
							
								ed4b303c10 
								
							 
						 
						
							
							
								
								Refactoring of formal parameter flags. Enable properly use of  
							
							 
							
							... 
							
							
							
							zext/sext/aext stuff.
llvm-svn: 35008 
							
						 
						
							2007-03-07 16:25:09 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								13780ac7db 
								
							 
						 
						
							
							
								
								big endian 32-bit systems (e.g. ppc32) want to return the high reg first, not  
							
							 
							
							... 
							
							
							
							the lo-reg first.  This is fallout from my ppc calling conv change yesterday,
it fixes test/ExecutionEngine/2003-05-06-LivenessClobber.llx
llvm-svn: 34983 
							
						 
						
							2007-03-06 20:01:06 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ca401aac31 
								
							 
						 
						
							
							
								
								Fix CodeGen/Generic/fpowi-promote.ll and PR1239  
							
							 
							
							... 
							
							
							
							llvm-svn: 34893 
							
						 
						
							2007-03-03 23:43:21 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								567b9254cd 
								
							 
						 
						
							
							
								
								Add an expand action for ISD label which just deletes the label.  
							
							 
							
							... 
							
							
							
							This "fixes" PR1238.
llvm-svn: 34890 
							
						 
						
							2007-03-03 19:21:38 +00:00  
						
					 
				
					
						
							
							
								 
								Jim Laskey
							
						 
						
							 
							
							
							
							
								
							
							
								644af6b68f 
								
							 
						 
						
							
							
								
								Chain is on second operand.  
							
							 
							
							... 
							
							
							
							llvm-svn: 34759 
							
						 
						
							2007-02-28 20:43:58 +00:00  
						
					 
				
					
						
							
							
								 
								Jim Laskey
							
						 
						
							 
							
							
							
							
								
							
							
								b869ab6f31 
								
							 
						 
						
							
							
								
								Drop unused operand.  
							
							 
							
							... 
							
							
							
							llvm-svn: 34555 
							
						 
						
							2007-02-24 09:44:17 +00:00  
						
					 
				
					
						
							
							
								 
								Jim Laskey
							
						 
						
							 
							
							
							
							
								
							
							
								7f5872c455 
								
							 
						 
						
							
							
								
								Simplify lowering and selection of exception ops.  
							
							 
							
							... 
							
							
							
							llvm-svn: 34491 
							
						 
						
							2007-02-22 15:37:19 +00:00  
						
					 
				
					
						
							
							
								 
								Jim Laskey
							
						 
						
							 
							
							
							
							
								
							
							
								4b37a4c712 
								
							 
						 
						
							
							
								
								Selection and lowering for exception handling.  
							
							 
							
							... 
							
							
							
							llvm-svn: 34481 
							
						 
						
							2007-02-21 22:53:45 +00:00  
						
					 
				
					
						
							
							
								 
								Reid Spencer
							
						 
						
							 
							
							
							
							
								
							
							
								09575bac2e 
								
							 
						 
						
							
							
								
								For PR1195:  
							
							 
							
							... 
							
							
							
							Change use of "packed" term to "vector" in comments, strings, variable
names, etc.
llvm-svn: 34300 
							
						 
						
							2007-02-15 03:39:18 +00:00  
						
					 
				
					
						
							
							
								 
								Reid Spencer
							
						 
						
							 
							
							
							
							
								
							
							
								d84d35ba70 
								
							 
						 
						
							
							
								
								For PR1195:  
							
							 
							
							... 
							
							
							
							Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.
llvm-svn: 34293 
							
						 
						
							2007-02-15 02:26:10 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								945e437c65 
								
							 
						 
						
							
							
								
								Generalize TargetData strings, to support more interesting forms of data.  
							
							 
							
							... 
							
							
							
							Patch by Scott Michel.
llvm-svn: 34266 
							
						 
						
							2007-02-14 05:52:17 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								59b27fa371 
								
							 
						 
						
							
							
								
								implement expand of truncate.  This allows truncates from i128 to i64 to  
							
							 
							
							... 
							
							
							
							be supported on 32-bit hosts.
llvm-svn: 34257 
							
						 
						
							2007-02-13 23:55:16 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								93049457ee 
								
							 
						 
						
							
							
								
								Make use of TLI.SimplifySetCC() in LegalizeSetCCOperands().  
							
							 
							
							... 
							
							
							
							llvm-svn: 34066 
							
						 
						
							2007-02-08 22:16:19 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								94c44c96d3 
								
							 
						 
						
							
							
								
								swtich vector-> smallvector, speeding up selectiondag stuff 1%  
							
							 
							
							... 
							
							
							
							llvm-svn: 33861 
							
						 
						
							2007-02-04 01:20:02 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								4b0ddb22e9 
								
							 
						 
						
							
							
								
								Switch promoted/expanded ops over to using a DenseMap.  Vector related maps  
							
							 
							
							... 
							
							
							
							aren't worth it.
llvm-svn: 33860 
							
						 
						
							2007-02-04 01:17:38 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ed39c86176 
								
							 
						 
						
							
							
								
								switch LegalizedNodes from std::map to a DenseMap.  This speeds up isel  
							
							 
							
							... 
							
							
							
							time as a whole on kc++ by 11%.
llvm-svn: 33857 
							
						 
						
							2007-02-04 00:50:02 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ebeb48d4bc 
								
							 
						 
						
							
							
								
								Eliminate some malloc traffic from LegalizeAllNodesNotLeadingTo, speeding  
							
							 
							
							... 
							
							
							
							up isel on kimwitu by 0.7%.
llvm-svn: 33853 
							
						 
						
							2007-02-04 00:27:56 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								e83030b9c8 
								
							 
						 
						
							
							
								
								Switch ComputeTopDownOrdering over to using a densemap.  This speeds up  
							
							 
							
							... 
							
							
							
							isel as a whole by 3.3%.
llvm-svn: 33809 
							
						 
						
							2007-02-03 01:12:36 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								f309d13677 
								
							 
						 
						
							
							
								
								Pasto  
							
							 
							
							... 
							
							
							
							llvm-svn: 33806 
							
						 
						
							2007-02-03 00:43:46 +00:00  
						
					 
				
					
						
							
							
								 
								Anton Korobeynikov
							
						 
						
							 
							
							
							
							
								
							
							
								1b4e6015b4 
								
							 
						 
						
							
							
								
								Fixed uninitialized stuff inside LegalizeDAG. Fortunately, the only  
							
							 
							
							... 
							
							
							
							affected part is codegen of "memove" inside x86 backend. This fixes
PR1144
llvm-svn: 33752 
							
						 
						
							2007-02-01 08:39:52 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								296a83cefb 
								
							 
						 
						
							
							
								
								Fit in 80 columns  
							
							 
							
							... 
							
							
							
							llvm-svn: 33745 
							
						 
						
							2007-02-01 04:55:59 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								53026f1d5a 
								
							 
						 
						
							
							
								
								Allow the target to override the ISD::CondCode that's to be used to test the  
							
							 
							
							... 
							
							
							
							result of the comparison libcall against zero.
llvm-svn: 33701 
							
						 
						
							2007-01-31 09:29:11 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								eda5997cc8 
								
							 
						 
						
							
							
								
								Finish off bug 680, allowing targets to custom lower frame and return  
							
							 
							
							... 
							
							
							
							address nodes.
llvm-svn: 33636 
							
						 
						
							2007-01-29 22:58:52 +00:00  
						
					 
				
					
						
							
							
								 
								Anton Korobeynikov
							
						 
						
							 
							
							
							
							
								
							
							
								9fa3839d29 
								
							 
						 
						
							
							
								
								More cleanup  
							
							 
							
							... 
							
							
							
							llvm-svn: 33605 
							
						 
						
							2007-01-28 16:04:40 +00:00  
						
					 
				
					
						
							
							
								 
								Anton Korobeynikov
							
						 
						
							 
							
							
							
							
								
							
							
								037c867b54 
								
							 
						 
						
							
							
								
								Propagate changes from my local tree. This patch includes:  
							
							 
							
							... 
							
							
							
							1. New parameter attribute called 'inreg'. It has meaning "place this
parameter in registers, if possible". This is some generalization of
gcc's regparm(n) attribute. It's currently used only in X86-32 backend.
2. Completely rewritten CC handling/lowering code inside X86 backend.
Merged stdcall + c CCs and fastcall + fast CC.
3. Dropped CSRET CC. We cannot add struct return variant for each
target-specific CC (e.g. stdcall + csretcc and so on).
4. Instead of CSRET CC introduced 'sret' parameter attribute. Setting in
on first attribute has meaning 'This is hidden pointer to structure
return. Handle it gently'.
5. Fixed small bug in llvm-extract + add new feature to
FunctionExtraction pass, which relinks all internal-linkaged callees
from deleted function to external linkage. This will allow further
linking everything together.
NOTEs: 1. Documentation will be updated soon.
       2. llvm-upgrade should be improved to translate csret => sret.
          Before this, there will be some unexpected test fails.
llvm-svn: 33597 
							
						 
						
							2007-01-28 13:31:35 +00:00  
						
					 
				
					
						
							
							
								 
								Jim Laskey
							
						 
						
							 
							
							
							
							
								
							
							
								c56315c2b5 
								
							 
						 
						
							
							
								
								Change the MachineDebugInfo to MachineModuleInfo to better reflect usage  
							
							 
							
							... 
							
							
							
							for debugging and exception handling.
llvm-svn: 33550 
							
						 
						
							2007-01-26 21:22:28 +00:00  
						
					 
				
					
						
							
							
								 
								Jim Laskey
							
						 
						
							 
							
							
							
							
								
							
							
								f9e5445ed4 
								
							 
						 
						
							
							
								
								Make LABEL a builtin opcode.  
							
							 
							
							... 
							
							
							
							llvm-svn: 33537 
							
						 
						
							2007-01-26 14:34:52 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								50ee0e40e5 
								
							 
						 
						
							
							
								
								Teach TargetData to handle 'preferred' alignment for each target, and use  
							
							 
							
							... 
							
							
							
							these alignment amounts to align scalars when we can.  Patch by Scott Michel!
llvm-svn: 33409 
							
						 
						
							2007-01-20 22:35:55 +00:00  
						
					 
				
					
						
							
							
								 
								Reid Spencer
							
						 
						
							 
							
							
							
							
								
							
							
								a94d394ad2 
								
							 
						 
						
							
							
								
								For PR1043:  
							
							 
							
							... 
							
							
							
							This is the final patch for this PR. It implements some minor cleanup
in the use of IntegerType, to wit:
1. Type::getIntegerTypeMask -> IntegerType::getBitMask
2. Type::Int*Ty changed to IntegerType* from Type*
3. ConstantInt::getType() returns IntegerType* now, not Type*
This also fixes PR1120.
Patch by Sheng Zhou.
llvm-svn: 33370 
							
						 
						
							2007-01-19 21:13:56 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								31cbddf28a 
								
							 
						 
						
							
							
								
								Store default libgcc routine names and allow them to be redefined by target.  
							
							 
							
							... 
							
							
							
							llvm-svn: 33105 
							
						 
						
							2007-01-12 02:11:51 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								5f80c450f3 
								
							 
						 
						
							
							
								
								Expand fcopysign to the bitwise sequence if select is marked as expensive.  
							
							 
							
							... 
							
							
							
							llvm-svn: 32940 
							
						 
						
							2007-01-05 23:33:44 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								3b841ddbe0 
								
							 
						 
						
							
							
								
								Bug in ExpandFCOPYSIGNToBitwiseOps(). Clear the old sign bit of operand 0  
							
							 
							
							... 
							
							
							
							before or'ing in the sign bit of operand 1.
llvm-svn: 32930 
							
						 
						
							2007-01-05 21:31:51 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								003feb03d5 
								
							 
						 
						
							
							
								
								Expand fcopysign to a series of bitwise of operations when it's profitable to  
							
							 
							
							... 
							
							
							
							do so.
llvm-svn: 32881 
							
						 
						
							2007-01-04 21:56:39 +00:00  
						
					 
				
					
						
							
							
								 
								Reid Spencer
							
						 
						
							 
							
							
							
							
								
							
							
								791864c6a5 
								
							 
						 
						
							
							
								
								Clean up from recent changes. Comment the new parameter to ExpandLibCall.  
							
							 
							
							... 
							
							
							
							Consolidate some lines of code and remove duplication.
llvm-svn: 32829 
							
						 
						
							2007-01-03 04:22:32 +00:00  
						
					 
				
					
						
							
							
								 
								Reid Spencer
							
						 
						
							 
							
							
							
							
								
							
							
								e63b6518fa 
								
							 
						 
						
							
							
								
								For PR950:  
							
							 
							
							... 
							
							
							
							Three changes:
1. Convert signed integer types to signless versions.
2. Implement the @sext and @zext parameter attributes. Previously the
   type of an function parameter was used to determine whether it should
   be sign extended or zero extended before the call. This information is
   now communicated via the function type's parameter attributes.
3. The interface to LowerCallTo had to be changed in order to accommodate
   the parameter attribute information. Although it would have been
   convenient to pass in the FunctionType itself, there isn't always one
   present in the caller. Consequently, a signedness indication for the
   result type and for each parameter was provided for in the interface
   to this method. All implementations were changed to make the adjustment
   necessary.
llvm-svn: 32788 
							
						 
						
							2006-12-31 05:55:36 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								9ad6edf2ec 
								
							 
						 
						
							
							
								
								May need to promote the operand (either sign_extend_inreg or and) before  
							
							 
							
							... 
							
							
							
							expanding a {s|u}int_to_fp.
llvm-svn: 32665 
							
						 
						
							2006-12-19 01:44:04 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								adc80f98cf 
								
							 
						 
						
							
							
								
								LegalizeSetCCOperands() may end up inserting libcalls. They need to be  
							
							 
							
							... 
							
							
							
							properly serialized. Do not clear LastCallSEQ_END until that is done.
llvm-svn: 32659 
							
						 
						
							2006-12-18 22:55:34 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								851e589eda 
								
							 
						 
						
							
							
								
								Expand FP undef  
							
							 
							
							... 
							
							
							
							llvm-svn: 32623 
							
						 
						
							2006-12-16 02:20:50 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								860004688a 
								
							 
						 
						
							
							
								
								Allow promoted FP_TO_UINT / FP_TO_SINT to expand operand.  
							
							 
							
							... 
							
							
							
							llvm-svn: 32621 
							
						 
						
							2006-12-16 02:10:30 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								388cbbf000 
								
							 
						 
						
							
							
								
								Expand fabs / fneg to and / xor.  
							
							 
							
							... 
							
							
							
							llvm-svn: 32619 
							
						 
						
							2006-12-16 00:52:40 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								884bc09d10 
								
							 
						 
						
							
							
								
								Fix select_cc, select expansion to soft-fp bugs.  
							
							 
							
							... 
							
							
							
							llvm-svn: 32616 
							
						 
						
							2006-12-15 22:42:55 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								b1a9492ed7 
								
							 
						 
						
							
							
								
								silence a bogus warning  
							
							 
							
							... 
							
							
							
							llvm-svn: 32597 
							
						 
						
							2006-12-15 07:36:19 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								35fdd5ffe1 
								
							 
						 
						
							
							
								
								Expand FP compares to soft-fp call(s)  
							
							 
							
							... 
							
							
							
							llvm-svn: 32590 
							
						 
						
							2006-12-15 02:59:56 +00:00  
						
					 
				
					
						
							
							
								 
								Jim Laskey
							
						 
						
							 
							
							
							
							
								
							
							
								70323a8146 
								
							 
						 
						
							
							
								
								1. Tidy up jump table info.  
							
							 
							
							... 
							
							
							
							2. Allow the jit to handle PIC relocable jump tables.
llvm-svn: 32581 
							
						 
						
							2006-12-14 19:17:33 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								22cf89967b 
								
							 
						 
						
							
							
								
								More soft-fp work.  
							
							 
							
							... 
							
							
							
							llvm-svn: 32559 
							
						 
						
							2006-12-13 20:57:08 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								e370e0eb09 
								
							 
						 
						
							
							
								
								Expand (f64 extload f32) to (f64 fp_ext (load f32)) if f64 type action is expand.  
							
							 
							
							... 
							
							
							
							llvm-svn: 32527 
							
						 
						
							2006-12-13 03:19:57 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								f3a80c6235 
								
							 
						 
						
							
							
								
								Expand fsqrt, fsin, and fcos to libcalls.  
							
							 
							
							... 
							
							
							
							llvm-svn: 32526 
							
						 
						
							2006-12-13 02:38:13 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								0a5b805f6d 
								
							 
						 
						
							
							
								
								Expand f32 / f64 to i32 / i64 conversion to soft-fp library calls.  
							
							 
							
							... 
							
							
							
							llvm-svn: 32523 
							
						 
						
							2006-12-13 01:57:55 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								3766fc60da 
								
							 
						 
						
							
							
								
								Expand FP constant to integers if FP types are not legal.  
							
							 
							
							... 
							
							
							
							llvm-svn: 32497 
							
						 
						
							2006-12-12 22:19:28 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								97a750fc47 
								
							 
						 
						
							
							
								
								Soft fp FNEG, SINT_TO_FP, UINT_TO_FP libcall expansion.  
							
							 
							
							... 
							
							
							
							llvm-svn: 32495 
							
						 
						
							2006-12-12 21:51:17 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								47833a1d28 
								
							 
						 
						
							
							
								
								Expand ConstantFP to load from CP if float types are being expanded.  
							
							 
							
							... 
							
							
							
							llvm-svn: 32494 
							
						 
						
							2006-12-12 21:32:44 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								0076ca0da9 
								
							 
						 
						
							
							
								
								- When expanding a bit_convert whose src operand is also to be expanded and  
							
							 
							
							... 
							
							
							
							its expansion result type is equal to the result type of the bit_convert,
e.g. (i64 bit_convert (f64 op)) if FP is not legal
returns the result of the expanded source operand.
- Store f32 / f64 may be expanded to a single store i32/i64.
llvm-svn: 32490 
							
						 
						
							2006-12-12 19:53:13 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2f96e7d241 
								
							 
						 
						
							
							
								
								fit in 80 cols  
							
							 
							
							... 
							
							
							
							llvm-svn: 32474 
							
						 
						
							2006-12-12 05:22:21 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								080881614d 
								
							 
						 
						
							
							
								
								this can only be fptrunc.  
							
							 
							
							... 
							
							
							
							llvm-svn: 32473 
							
						 
						
							2006-12-12 05:21:51 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								6ba11fbd75 
								
							 
						 
						
							
							
								
								Revert Nate's patch to fix X86/store-fp-constant.ll.  With the dag combiner  
							
							 
							
							... 
							
							
							
							and legalizer separated like they currently are, I don't see a way to handle
this xform.
llvm-svn: 32466 
							
						 
						
							2006-12-12 04:18:56 +00:00  
						
					 
				
					
						
							
							
								 
								Reid Spencer
							
						 
						
							 
							
							
							
							
								
							
							
								3c49edcaa1 
								
							 
						 
						
							
							
								
								Change inferred cast creation calls to more specific cast creations.  
							
							 
							
							... 
							
							
							
							llvm-svn: 32460 
							
						 
						
							2006-12-12 01:17:41 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								3432ab97c1 
								
							 
						 
						
							
							
								
								Re-apply changes that were backed out and fix a naughty typo.  
							
							 
							
							... 
							
							
							
							llvm-svn: 32442 
							
						 
						
							2006-12-11 19:27:14 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								e9a203c4e5 
								
							 
						 
						
							
							
								
								Revert changes that broke oggenc on ppc  
							
							 
							
							... 
							
							
							
							llvm-svn: 32440 
							
						 
						
							2006-12-11 18:53:38 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								f4bec95b58 
								
							 
						 
						
							
							
								
								f32 / f64 node is expanded to one i32 / i64 node.  
							
							 
							
							... 
							
							
							
							llvm-svn: 32433 
							
						 
						
							2006-12-11 06:50:04 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								f6b01fdb48 
								
							 
						 
						
							
							
								
								Clean up some bad code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 32432 
							
						 
						
							2006-12-11 06:25:26 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								8e20c760fa 
								
							 
						 
						
							
							
								
								Move something that should be in the dag combiner from the legalizer to the  
							
							 
							
							... 
							
							
							
							dag combiner.
llvm-svn: 32431 
							
						 
						
							2006-12-11 02:23:46 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								4eee72471c 
								
							 
						 
						
							
							
								
								Preliminary soft float support.  
							
							 
							
							... 
							
							
							
							llvm-svn: 32394 
							
						 
						
							2006-12-09 02:42:38 +00:00  
						
					 
				
					
						
							
							
								 
								Bill Wendling
							
						 
						
							 
							
							
							
							
								
							
							
								22e978a736 
								
							 
						 
						
							
							
								
								Removing even more <iostream> includes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 32320 
							
						 
						
							2006-12-07 20:04:42 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								a743fada65 
								
							 
						 
						
							
							
								
								Avoid inifinite looping if READCYCLECOUNTER isn't custom lowered.  
							
							 
							
							... 
							
							
							
							llvm-svn: 32022 
							
						 
						
							2006-11-29 19:13:47 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								6973993e9c 
								
							 
						 
						
							
							
								
								Allow target to custom lower READCYCLECOUNTER (when it doesn't have to be expanded).  
							
							 
							
							... 
							
							
							
							llvm-svn: 32016 
							
						 
						
							2006-11-29 08:26:18 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								3abb63651b 
								
							 
						 
						
							
							
								
								Fix PR1016  
							
							 
							
							... 
							
							
							
							llvm-svn: 31950 
							
						 
						
							2006-11-28 01:03:30 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								db18938355 
								
							 
						 
						
							
							
								
								If a brcond condition is promoted, make sure to zero extend it, even if not  
							
							 
							
							... 
							
							
							
							expanded into BR_CC.
llvm-svn: 31932 
							
						 
						
							2006-11-27 04:39:56 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								94c231f453 
								
							 
						 
						
							
							
								
								Fix PR988 and CodeGen/Generic/2006-11-06-MemIntrinsicExpand.ll.  
							
							 
							
							... 
							
							
							
							The low part goes in the first operand of expandop, not the second one.
llvm-svn: 31487 
							
						 
						
							2006-11-07 04:11:44 +00:00  
						
					 
				
					
						
							
							
								 
								Reid Spencer
							
						 
						
							 
							
							
							
							
								
							
							
								de46e48420 
								
							 
						 
						
							
							
								
								For PR786:  
							
							 
							
							... 
							
							
							
							Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.
llvm-svn: 31380 
							
						 
						
							2006-11-02 20:25:50 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								e6d584765f 
								
							 
						 
						
							
							
								
								Fix a typo which can break jumptables.  
							
							 
							
							... 
							
							
							
							llvm-svn: 31305 
							
						 
						
							2006-10-31 02:31:00 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								84a28d4e76 
								
							 
						 
						
							
							
								
								Lower jumptable to BR_JT. The legalizer can lower it to a BRIND or let the target custom lower it.  
							
							 
							
							... 
							
							
							
							llvm-svn: 31293 
							
						 
						
							2006-10-30 08:00:44 +00:00  
						
					 
				
					
						
							
							
								 
								Reid Spencer
							
						 
						
							 
							
							
							
							
								
							
							
								e0fc4dfc22 
								
							 
						 
						
							
							
								
								For PR950:  
							
							 
							
							... 
							
							
							
							This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.
llvm-svn: 31063 
							
						 
						
							2006-10-20 07:07:24 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								ab51cf2e78 
								
							 
						 
						
							
							
								
								Merge ISD::TRUNCSTORE to ISD::STORE. Switch to using StoreSDNode.  
							
							 
							
							... 
							
							
							
							llvm-svn: 30945 
							
						 
						
							2006-10-13 21:14:26 +00:00  
						
					 
				
					
						
							
							
								 
								Jim Laskey
							
						 
						
							 
							
							
							
							
								
							
							
								6a4c6d3a7a 
								
							 
						 
						
							
							
								
								Typo  
							
							 
							
							... 
							
							
							
							llvm-svn: 30884 
							
						 
						
							2006-10-11 17:52:19 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								d35734bd1f 
								
							 
						 
						
							
							
								
								Naming consistency.  
							
							 
							
							... 
							
							
							
							llvm-svn: 30878 
							
						 
						
							2006-10-11 07:10:22 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								a6bbf33cbf 
								
							 
						 
						
							
							
								
								Jimptables working again on alpha.  
							
							 
							
							... 
							
							
							
							As a bonus, use the GOT node instead of the AlphaISD::GOT for internal stuff.
llvm-svn: 30873 
							
						 
						
							2006-10-11 04:29:42 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								8438429c96 
								
							 
						 
						
							
							
								
								Fix another bug in extload promotion.  
							
							 
							
							... 
							
							
							
							llvm-svn: 30857 
							
						 
						
							2006-10-10 18:54:19 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								dc6a3aab71 
								
							 
						 
						
							
							
								
								Fix a bug introduced by my LOAD/LOADX changes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 30853 
							
						 
						
							2006-10-10 07:51:21 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								e71fe34d75 
								
							 
						 
						
							
							
								
								Reflects ISD::LOAD / ISD::LOADX / LoadSDNode changes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 30844 
							
						 
						
							2006-10-09 20:57:25 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f9f90bc239 
								
							 
						 
						
							
							
								
								Fix a bug legalizing zero-extending i64 loads into 32-bit loads.  The bottom  
							
							 
							
							... 
							
							
							
							part was always forced to be sextload, even when we needed an zextload.
llvm-svn: 30782 
							
						 
						
							2006-10-07 00:58:36 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f5839a0816 
								
							 
						 
						
							
							
								
								Fix a miscompilation of:  
							
							 
							
							... 
							
							
							
							long long foo(long long X) {
  return (long long)(signed char)(int)X;
}
Instead of:
_foo:
        extsb r2, r4
        srawi r3, r4, 31
        mr r4, r2
        blr
we now produce:
_foo:
        extsb r4, r4
        srawi r3, r4, 31
        blr
This fixes a miscompilation in ConstantFolding.cpp.
llvm-svn: 30768 
							
						 
						
							2006-10-06 17:34:12 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								df9ac47e5e 
								
							 
						 
						
							
							
								
								Make use of getStore().  
							
							 
							
							... 
							
							
							
							llvm-svn: 30759 
							
						 
						
							2006-10-05 23:01:46 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								5d9fd977d3 
								
							 
						 
						
							
							
								
								Combine ISD::EXTLOAD, ISD::SEXTLOAD, ISD::ZEXTLOAD into ISD::LOADX. Add an  
							
							 
							
							... 
							
							
							
							extra operand to LOADX to specify the exact value extension type.
llvm-svn: 30714 
							
						 
						
							2006-10-04 00:56:09 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								91d76cb27f 
								
							 
						 
						
							
							
								
								Fix an obvious typo.  
							
							 
							
							... 
							
							
							
							llvm-svn: 30711 
							
						 
						
							2006-10-03 23:08:27 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								783a4a9d86 
								
							 
						 
						
							
							
								
								Add support for other relocation bases to jump tables, as well as custom asm directives  
							
							 
							
							... 
							
							
							
							llvm-svn: 30593 
							
						 
						
							2006-09-24 19:45:58 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								875ea0cdbd 
								
							 
						 
						
							
							
								
								Expand 64-bit shifts more optimally if we know that the high bit of the  
							
							 
							
							... 
							
							
							
							shift amount is one or zero.  For example, for:
long long foo1(long long X, int C) {
  return X << (C|32);
}
long long foo2(long long X, int C) {
  return X << (C&~32);
}
we get:
_foo1:
        movb $31, %cl
        movl 4(%esp), %edx
        andb 12(%esp), %cl
        shll %cl, %edx
        xorl %eax, %eax
        ret
_foo2:
        movb $223, %cl
        movl 4(%esp), %eax
        movl 8(%esp), %edx
        andb 12(%esp), %cl
        shldl %cl, %eax, %edx
        shll %cl, %eax
        ret
instead of:
_foo1:
        subl $4, %esp
        movl %ebx, (%esp)
        movb $32, %bl
        movl 8(%esp), %eax
        movl 12(%esp), %edx
        movb %bl, %cl
        orb 16(%esp), %cl
        shldl %cl, %eax, %edx
        shll %cl, %eax
        xorl %ecx, %ecx
        testb %bl, %bl
        cmovne %eax, %edx
        cmovne %ecx, %eax
        movl (%esp), %ebx
        addl $4, %esp
        ret
_foo2:
        subl $4, %esp
        movl %ebx, (%esp)
        movb $223, %cl
        movl 8(%esp), %eax
        movl 12(%esp), %edx
        andb 16(%esp), %cl
        shldl %cl, %eax, %edx
        shll %cl, %eax
        xorl %ecx, %ecx
        xorb %bl, %bl
        testb %bl, %bl
        cmovne %eax, %edx
        cmovne %ecx, %eax
        movl (%esp), %ebx
        addl $4, %esp
        ret
llvm-svn: 30506 
							
						 
						
							2006-09-20 03:38:48 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								1fc7c363e6 
								
							 
						 
						
							
							
								
								Fix a typo.  
							
							 
							
							... 
							
							
							
							llvm-svn: 30474 
							
						 
						
							2006-09-18 23:28:33 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								4bfaf0bd2c 
								
							 
						 
						
							
							
								
								Allow  i32 UDIV, SDIV, UREM, SREM to be expanded into libcalls.  
							
							 
							
							... 
							
							
							
							llvm-svn: 30470 
							
						 
						
							2006-09-18 21:49:04 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								e50f5d1fb1 
								
							 
						 
						
							
							
								
								Oh yeah, this is needed too  
							
							 
							
							... 
							
							
							
							llvm-svn: 30407 
							
						 
						
							2006-09-16 05:08:34 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								1b63391fdf 
								
							 
						 
						
							
							
								
								simplify control flow, no functionality change  
							
							 
							
							... 
							
							
							
							llvm-svn: 30403 
							
						 
						
							2006-09-16 00:21:44 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								fbadbda6ba 
								
							 
						 
						
							
							
								
								Allow custom expand of mul  
							
							 
							
							... 
							
							
							
							llvm-svn: 30402 
							
						 
						
							2006-09-16 00:09:24 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								72b503bcad 
								
							 
						 
						
							
							
								
								Compile X << 1 (where X is a long-long) to:  
							
							 
							
							... 
							
							
							
							addl %ecx, %ecx
        adcl %eax, %eax
instead of:
        movl %ecx, %edx
        addl %edx, %edx
        shrl $31, %ecx
        addl %eax, %eax
        orl %ecx, %eax
and to:
        addc r5, r5, r5
        adde r4, r4, r4
instead of:
        slwi r2,r9,1
        srwi r0,r11,31
        slwi r3,r11,1
        or r2,r0,r2
on PPC.
llvm-svn: 30284 
							
						 
						
							2006-09-13 03:50:39 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f0359b343a 
								
							 
						 
						
							
							
								
								Implement the fpowi now by lowering to a libcall  
							
							 
							
							... 
							
							
							
							llvm-svn: 30225 
							
						 
						
							2006-09-09 06:03:30 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								e4bbb6c341 
								
							 
						 
						
							
							
								
								Allow targets to custom lower expanded BIT_CONVERT's  
							
							 
							
							... 
							
							
							
							llvm-svn: 30217 
							
						 
						
							2006-09-09 00:20:27 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								e93762d36e 
								
							 
						 
						
							
							
								
								Allow legalizer to expand ISD::MUL using only MULHS in the rare case that is  
							
							 
							
							... 
							
							
							
							possible and the target only supports MULHS.
llvm-svn: 30022 
							
						 
						
							2006-09-01 18:17:58 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								3d27be1333 
								
							 
						 
						
							
							
								
								s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|  
							
							 
							
							... 
							
							
							
							llvm-svn: 29911 
							
						 
						
							2006-08-27 12:54:02 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								451b099113 
								
							 
						 
						
							
							
								
								Fix PR861  
							
							 
							
							... 
							
							
							
							llvm-svn: 29796 
							
						 
						
							2006-08-21 20:24:53 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								bd8877744b 
								
							 
						 
						
							
							
								
								eliminate use of getNode that takes vector of valuetypes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 29687 
							
						 
						
							2006-08-14 23:53:35 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c24a1d3093 
								
							 
						 
						
							
							
								
								Start eliminating temporary vectors used to create DAG nodes.  Instead, pass  
							
							 
							
							... 
							
							
							
							in the start of an array and a count of operands where applicable.  In many
cases, the number of operands is known, so this static array can be allocated
on the stack, avoiding the heap.  In many other cases, a SmallVector can be
used, which has the same benefit in the common cases.
I updated a lot of code calling getNode that takes a vector, but ran out of
time.  The rest of the code should be updated, and these methods should be
removed.
We should also do the same thing to eliminate the methods that take a
vector of MVT::ValueTypes.
It would be extra nice to convert the dagiselemitter to avoid creating vectors
for operands when calling getTargetNode.
llvm-svn: 29566 
							
						 
						
							2006-08-08 02:23:42 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								97af9d5d3a 
								
							 
						 
						
							
							
								
								Eliminate some malloc traffic by allocating vectors on the stack.  Change some  
							
							 
							
							... 
							
							
							
							method that took std::vector<SDOperand> to take a pointer to a first operand
and #operands.
This speeds up isel on kc++ by about 3%.
llvm-svn: 29561 
							
						 
						
							2006-08-08 01:09:31 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								8927c875bb 
								
							 
						 
						
							
							
								
								Make SelectionDAG::RemoveDeadNodes iterative instead of recursive, which  
							
							 
							
							... 
							
							
							
							also make it simpler.
llvm-svn: 29524 
							
						 
						
							2006-08-04 17:45:20 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								4488f0c303 
								
							 
						 
						
							
							
								
								Fix a case where LegalizeAllNodesNotLeadingTo could take exponential time.  
							
							 
							
							... 
							
							
							
							This manifested itself as really long time to compile
Regression/CodeGen/Generic/2003-05-28-ManyArgs.ll on ppc.
This is PR847.
llvm-svn: 29313 
							
						 
						
							2006-07-26 23:55:56 +00:00  
						
					 
				
					
						
							
							
								 
								Jim Laskey
							
						 
						
							 
							
							
							
							
								
							
							
								c3d341ea98 
								
							 
						 
						
							
							
								
								Ensure that dump calls that are associated with asserts are removed from  
							
							 
							
							... 
							
							
							
							non-debug build.
llvm-svn: 29105 
							
						 
						
							2006-07-11 17:58:07 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								1b8ea1f5ba 
								
							 
						 
						
							
							
								
								Fix CodeGen/Alpha/2006-07-03-ASMFormalLowering.ll and PR818.  
							
							 
							
							... 
							
							
							
							llvm-svn: 29099 
							
						 
						
							2006-07-11 01:40:09 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								54a34cd20b 
								
							 
						 
						
							
							
								
								Mark these two classes as hidden, shrinking libllbmgcc.dylib by 25K  
							
							 
							
							... 
							
							
							
							llvm-svn: 28970 
							
						 
						
							2006-06-28 21:58:30 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								a2e9953c54 
								
							 
						 
						
							
							
								
								Change RET node to include signness information of the return values. e.g.  
							
							 
							
							... 
							
							
							
							RET chain, value1, sign1, value2, sign2
llvm-svn: 28509 
							
						 
						
							2006-05-26 23:09:09 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								aa2372562e 
								
							 
						 
						
							
							
								
								Patches to make the LLVM sources more -pedantic clean.  Patch provided  
							
							 
							
							... 
							
							
							
							by Anton Korobeynikov!  This is a step towards closing PR786.
llvm-svn: 28447 
							
						 
						
							2006-05-24 17:04:05 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								62f1b83c0e 
								
							 
						 
						
							
							
								
								When we legalize target nodes, do not use getNode to create a new node,  
							
							 
							
							... 
							
							
							
							use UpdateNodeOperands to just update the operands!  This is important because
getNode will allocate a new node if the node returns a flag and this breaks
assumptions in the legalizer that you can legalize some things multiple times
and get exactly the same results.
This latent bug was exposed by my ppc patch last night, and this fixes
gsm/toast.
llvm-svn: 28348 
							
						 
						
							2006-05-17 18:00:08 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								a1cec0106a 
								
							 
						 
						
							
							
								
								Add an assertion, avoid some unneeded work for each call.  No functionality  
							
							 
							
							... 
							
							
							
							change.
llvm-svn: 28347 
							
						 
						
							2006-05-17 17:55:45 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								aaa23d953f 
								
							 
						 
						
							
							
								
								Add a new ISD::CALL node, make the default impl of TargetLowering::LowerCallTo  
							
							 
							
							... 
							
							
							
							produce it.
llvm-svn: 28338 
							
						 
						
							2006-05-16 22:53:20 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5f0edfb849 
								
							 
						 
						
							
							
								
								Legalize FORMAL_ARGUMENTS nodes correctly, we don't want to legalize them once  
							
							 
							
							... 
							
							
							
							for each argument.
llvm-svn: 28313 
							
						 
						
							2006-05-16 05:49:56 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								69a0ce6261 
								
							 
						 
						
							
							
								
								Merge identical code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 28274 
							
						 
						
							2006-05-13 02:11:14 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								1a225d23ae 
								
							 
						 
						
							
							
								
								Fix PR773  
							
							 
							
							... 
							
							
							
							llvm-svn: 28207 
							
						 
						
							2006-05-09 18:20:51 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								20a631fde7 
								
							 
						 
						
							
							
								
								Refactor TargetMachine, pushing handling of TargetData into the target-specific subclasses.  This has one caller-visible change: getTargetData() now returns a pointer instead of a reference.  
							
							 
							
							... 
							
							
							
							This fixes PR 759.
llvm-svn: 28074 
							
						 
						
							2006-05-03 01:29:57 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								4ca2ea5b43 
								
							 
						 
						
							
							
								
								JumpTable support!  What this represents is working asm and jit support for  
							
							 
							
							... 
							
							
							
							x86 and ppc for 100% dense switch statements when relocations are non-PIC.
This support will be extended and enhanced in the coming days to support
PIC, and less dense forms of jump tables.
llvm-svn: 27947 
							
						 
						
							2006-04-22 18:53:45 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								73eb58e1a2 
								
							 
						 
						
							
							
								
								Simplify some code  
							
							 
							
							... 
							
							
							
							llvm-svn: 27846 
							
						 
						
							2006-04-19 23:17:50 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								916ae0775e 
								
							 
						 
						
							
							
								
								Fix handling of calls in functions that use vectors.  This fixes a crash on  
							
							 
							
							... 
							
							
							
							the code in GCC PR26546.
llvm-svn: 27780 
							
						 
						
							2006-04-17 22:10:08 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								326870b40b 
								
							 
						 
						
							
							
								
								Codegen insertelement with constant insertion points as scalar_to_vector  
							
							 
							
							... 
							
							
							
							and a shuffle.  For this:
void %test2(<4 x float>* %F, float %f) {
        %tmp = load <4 x float>* %F             ; <<4 x float>> [#uses=2]
        %tmp3 = add <4 x float> %tmp, %tmp              ; <<4 x float>> [#uses=1]
        %tmp2 = insertelement <4 x float> %tmp3, float %f, uint 2               ; <<4 x float>> [#uses=2]
        %tmp6 = add <4 x float> %tmp2, %tmp2            ; <<4 x float>> [#uses=1]
        store <4 x float> %tmp6, <4 x float>* %F
        ret void
}
we now get this on X86 (which will get better):
_test2:
        movl 4(%esp), %eax
        movaps (%eax), %xmm0
        addps %xmm0, %xmm0
        movaps %xmm0, %xmm1
        shufps $3, %xmm1, %xmm1
        movaps %xmm0, %xmm2
        shufps $1, %xmm2, %xmm2
        unpcklps %xmm1, %xmm2
        movss 8(%esp), %xmm1
        unpcklps %xmm1, %xmm0
        unpcklps %xmm2, %xmm0
        addps %xmm0, %xmm0
        movaps %xmm0, (%eax)
        ret
instead of:
_test2:
        subl $28, %esp
        movl 32(%esp), %eax
        movaps (%eax), %xmm0
        addps %xmm0, %xmm0
        movaps %xmm0, (%esp)
        movss 36(%esp), %xmm0
        movss %xmm0, 8(%esp)
        movaps (%esp), %xmm0
        addps %xmm0, %xmm0
        movaps %xmm0, (%eax)
        addl $28, %esp
        ret
llvm-svn: 27765 
							
						 
						
							2006-04-17 19:21:01 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								91226e5799 
								
							 
						 
						
							
							
								
								Add support for promoting stores from one legal type to another, allowing us  
							
							 
							
							... 
							
							
							
							to write one pattern for vector stores instead of 4.
llvm-svn: 27730 
							
						 
						
							2006-04-16 01:36:45 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								086e986e94 
								
							 
						 
						
							
							
								
								Make this assertion better  
							
							 
							
							... 
							
							
							
							llvm-svn: 27695 
							
						 
						
							2006-04-14 06:08:35 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								119266ea92 
								
							 
						 
						
							
							
								
								Promote vector AND, OR, and XOR  
							
							 
							
							... 
							
							
							
							llvm-svn: 27632 
							
						 
						
							2006-04-12 21:20:24 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								be8a8933e6 
								
							 
						 
						
							
							
								
								Vector type promotion for ISD::LOAD and ISD::SELECT  
							
							 
							
							... 
							
							
							
							llvm-svn: 27606 
							
						 
						
							2006-04-12 16:33:18 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								d3b504ae10 
								
							 
						 
						
							
							
								
								Implement support for the formal_arguments node.  To get this, targets shouldcustom legalize it and remove their XXXTargetLowering::LowerArguments overload  
							
							 
							
							... 
							
							
							
							llvm-svn: 27604 
							
						 
						
							2006-04-12 16:20:43 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								7256b0ae05 
								
							 
						 
						
							
							
								
								Only get Tmp2 for cases where number of operands is > 1. Fixed return void.  
							
							 
							
							... 
							
							
							
							llvm-svn: 27586 
							
						 
						
							2006-04-11 06:33:39 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								6cf3bbbe17 
								
							 
						 
						
							
							
								
								add some todos  
							
							 
							
							... 
							
							
							
							llvm-svn: 27580 
							
						 
						
							2006-04-11 02:00:08 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2eb22eef7d 
								
							 
						 
						
							
							
								
								Add basic support for legalizing returns of vectors  
							
							 
							
							... 
							
							
							
							llvm-svn: 27578 
							
						 
						
							2006-04-11 01:31:51 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								cb73b8d419 
								
							 
						 
						
							
							
								
								Missing break  
							
							 
							
							... 
							
							
							
							llvm-svn: 27559 
							
						 
						
							2006-04-10 18:54:36 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								02274a5265 
								
							 
						 
						
							
							
								
								Add code generator support for VSELECT  
							
							 
							
							... 
							
							
							
							llvm-svn: 27542 
							
						 
						
							2006-04-08 22:22:57 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								e1401e3610 
								
							 
						 
						
							
							
								
								Canonicalize vvector_shuffle(x,x) -> vvector_shuffle(x,undef) to enable patterns  
							
							 
							
							... 
							
							
							
							to match again :)
llvm-svn: 27533 
							
						 
						
							2006-04-08 05:34:25 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								101ea66813 
								
							 
						 
						
							
							
								
								add a sanity check: LegalizeOp should return a value that is the same type  
							
							 
							
							... 
							
							
							
							as its input.
llvm-svn: 27528 
							
						 
						
							2006-04-08 04:13:17 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								78e3d565af 
								
							 
						 
						
							
							
								
								INSERT_VECTOR_ELT lowering bug:  
							
							 
							
							... 
							
							
							
							store vector to $esp
  store element to $esp + sizeof(VT) * index
  load  vector from $esp
The bug is VT is the type of the vector element, not the type of the vector!
llvm-svn: 27517 
							
						 
						
							2006-04-08 01:46:37 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								9fa8959dce 
								
							 
						 
						
							
							
								
								Exapnd a VECTOR_SHUFFLE to a BUILD_VECTOR if target asks for it to be expanded  
							
							 
							
							... 
							
							
							
							or custom lowering fails.
llvm-svn: 27432 
							
						 
						
							2006-04-05 06:07:11 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								6be79823e7 
								
							 
						 
						
							
							
								
								* Add supprot for SCALAR_TO_VECTOR operations where the input needs to be  
							
							 
							
							... 
							
							
							
							promoted/expanded (e.g. SCALAR_TO_VECTOR from i8/i16 on PPC).
* Add support for targets to request that VECTOR_SHUFFLE nodes be promoted
  to a canonical type, for example, we only want v16i8 shuffles on PPC.
* Move isShuffleLegal out of TLI into Legalize.
* Teach isShuffleLegal to allow shuffles that need to be promoted.
llvm-svn: 27399 
							
						 
						
							2006-04-04 17:23:26 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								42a5fca47e 
								
							 
						 
						
							
							
								
								Implement promotion for EXTRACT_VECTOR_ELT, allowing v16i8 multiplies to work with PowerPC.  
							
							 
							
							... 
							
							
							
							llvm-svn: 27349 
							
						 
						
							2006-04-02 05:06:04 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								87f080949b 
								
							 
						 
						
							
							
								
								Implement the Expand action for binary vector operations to break the binop  
							
							 
							
							... 
							
							
							
							into elements and operate on each piece.  This allows generic vector integer
multiplies to work on PPC, though the generated code is horrible.
llvm-svn: 27347 
							
						 
						
							2006-04-02 03:57:31 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ef598059f2 
								
							 
						 
						
							
							
								
								Add a new -view-legalize-dags command line option  
							
							 
							
							... 
							
							
							
							llvm-svn: 27342 
							
						 
						
							2006-04-02 03:07:27 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								d9e4daabd2 
								
							 
						 
						
							
							
								
								Do not endian swap split vector loads.  This fixes UnitTests/Vector/sumarray-dbl on PPC.  
							
							 
							
							... 
							
							
							
							Now all UnitTests/Vector/* tests pass on PPC.
llvm-svn: 27299 
							
						 
						
							2006-03-31 18:22:37 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								8d90f526d7 
								
							 
						 
						
							
							
								
								Do not endian swap the operands to a store if the operands came from a vector.  
							
							 
							
							... 
							
							
							
							This fixes UnitTests/Vector/simple.c with altivec.
llvm-svn: 27298 
							
						 
						
							2006-03-31 18:20:46 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								6f42325dca 
								
							 
						 
						
							
							
								
								Implement PromoteOp for VEXTRACT_VECTOR_ELT.  Thsi fixes  
							
							 
							
							... 
							
							
							
							Generic/vector.ll:test_extract_elt on non-sse X86 systems.
llvm-svn: 27294 
							
						 
						
							2006-03-31 17:55:51 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								8e1fcab2bc 
								
							 
						 
						
							
							
								
								Scalarized vector stores need not be legal, e.g. if the vector element type  
							
							 
							
							... 
							
							
							
							needs to be promoted or expanded.  Relegalize the scalar store once created.
This fixes CodeGen/Generic/vector.ll:test1 on non-SSE x86 targets.
llvm-svn: 27293 
							
						 
						
							2006-03-31 17:37:22 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5fe1f54c17 
								
							 
						 
						
							
							
								
								Significantly improve handling of vectors that are live across basic blocks,  
							
							 
							
							... 
							
							
							
							handling cases where the vector elements need promotion, expansion, and when
the vector type itself needs to be decimated.
llvm-svn: 27278 
							
						 
						
							2006-03-31 02:06:56 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								168e45b0b3 
								
							 
						 
						
							
							
								
								Expand INSERT_VECTOR_ELT to store vec, sp; store elt, sp+k; vec = load sp;  
							
							 
							
							... 
							
							
							
							llvm-svn: 27274 
							
						 
						
							2006-03-31 01:27:51 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f6f94d3bce 
								
							 
						 
						
							
							
								
								Teach Legalize how to pack VVECTOR_SHUFFLE nodes into VECTOR_SHUFFLE nodes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 27232 
							
						 
						
							2006-03-28 20:24:43 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								e55d171ccd 
								
							 
						 
						
							
							
								
								Tblgen doesn't like multiple SDNode<> definitions that map to the sameenum value.  Split them into separate enums.  
							
							 
							
							... 
							
							
							
							llvm-svn: 27201 
							
						 
						
							2006-03-28 00:40:33 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								d5f94c9574 
								
							 
						 
						
							
							
								
								Fix legalization of intrinsics with chain and result values  
							
							 
							
							... 
							
							
							
							llvm-svn: 27181 
							
						 
						
							2006-03-27 20:28:29 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								30ee72586d 
								
							 
						 
						
							
							
								
								Allow targets to custom lower their own intrinsics if desired.  
							
							 
							
							... 
							
							
							
							llvm-svn: 27146 
							
						 
						
							2006-03-26 09:12:51 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								68d9bf26c8 
								
							 
						 
						
							
							
								
								Only to vector shuffle for {x,x,y,y} cases when SCALAR_TO_VECTOR is free.  
							
							 
							
							... 
							
							
							
							llvm-svn: 27071 
							
						 
						
							2006-03-24 18:45:20 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								77e271cb4e 
								
							 
						 
						
							
							
								
								prefer to generate constant pool loads over splats.  This prevents us from  
							
							 
							
							... 
							
							
							
							using a splat for {1.0,1.0,1.0,1.0}
llvm-svn: 27055 
							
						 
						
							2006-03-24 07:29:17 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								a4f6805a86 
								
							 
						 
						
							
							
								
								legalize vbit_convert nodes whose result is a legal type.  
							
							 
							
							... 
							
							
							
							Legalize intrinsic nodes.
llvm-svn: 27036 
							
						 
						
							2006-03-24 02:26:29 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								1d2e995fc1 
								
							 
						 
						
							
							
								
								Lower BUILD_VECTOR to VECTOR_SHUFFLE if there are two distinct nodes (and if  
							
							 
							
							... 
							
							
							
							the target can handle it). Issue two SCALAR_TO_VECTOR ops followed by a
VECTOR_SHUFFLE to select from the two vectors.
llvm-svn: 27023 
							
						 
						
							2006-03-24 01:17:21 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								d7c4e7d255 
								
							 
						 
						
							
							
								
								add support for splitting casts.  This implements  
							
							 
							
							... 
							
							
							
							CodeGen/Generic/vector.ll:test_cast_2.
llvm-svn: 26999 
							
						 
						
							2006-03-23 21:16:34 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								9ea1b3f9fd 
								
							 
						 
						
							
							
								
								simplify some code  
							
							 
							
							... 
							
							
							
							llvm-svn: 26972 
							
						 
						
							2006-03-23 05:29:04 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2f4119a608 
								
							 
						 
						
							
							
								
								Implement simple support for vector casting.  This can currently only handle  
							
							 
							
							... 
							
							
							
							casts between legal vector types.
llvm-svn: 26961 
							
						 
						
							2006-03-22 20:09:35 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								8fa445a89d 
								
							 
						 
						
							
							
								
								Endianness does not affect the order of vector fields.  This fixes  
							
							 
							
							... 
							
							
							
							SingleSource/UnitTests/Vector/build.c
llvm-svn: 26936 
							
						 
						
							2006-03-22 01:46:54 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5be4352124 
								
							 
						 
						
							
							
								
								Enclose some variables in a scope to avoid error with some gcc versions  
							
							 
							
							... 
							
							
							
							llvm-svn: 26934 
							
						 
						
							2006-03-22 00:12:37 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								340a6b5c26 
								
							 
						 
						
							
							
								
								add expand support for extractelement  
							
							 
							
							... 
							
							
							
							llvm-svn: 26931 
							
						 
						
							2006-03-21 21:02:03 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								7c0cd8cafc 
								
							 
						 
						
							
							
								
								add some trivial support for extractelement.  
							
							 
							
							... 
							
							
							
							llvm-svn: 26928 
							
						 
						
							2006-03-21 20:44:12 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								672a42d731 
								
							 
						 
						
							
							
								
								Add a hacky workaround for crashes due to vectors live across blocks.  
							
							 
							
							... 
							
							
							
							Note that this code won't work for vectors that aren't legal on the
target.  Improvements coming.
llvm-svn: 26925 
							
						 
						
							2006-03-21 19:20:37 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								21e68c8001 
								
							 
						 
						
							
							
								
								If a target supports splatting with SHUFFLE_VECTOR, lower to it from BUILD_VECTOR(x,x,x,x)  
							
							 
							
							... 
							
							
							
							llvm-svn: 26885 
							
						 
						
							2006-03-20 01:52:29 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								79fb91cc69 
								
							 
						 
						
							
							
								
								Allow SCALAR_TO_VECTOR to be custom lowered.  
							
							 
							
							... 
							
							
							
							llvm-svn: 26867 
							
						 
						
							2006-03-19 06:47:21 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								9cdc5a0ce7 
								
							 
						 
						
							
							
								
								Add SCALAR_TO_VECTOR support  
							
							 
							
							... 
							
							
							
							llvm-svn: 26866 
							
						 
						
							2006-03-19 06:31:19 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								eb5b2e705c 
								
							 
						 
						
							
							
								
								Don't bother storing undef elements of BUILD_VECTOR's  
							
							 
							
							... 
							
							
							
							llvm-svn: 26858 
							
						 
						
							2006-03-19 05:46:04 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5d3ff12c8f 
								
							 
						 
						
							
							
								
								Implement expand of BUILD_VECTOR containing variable elements.  
							
							 
							
							... 
							
							
							
							This implements CodeGen/Generic/vector.ll:test_variable_buildvector
llvm-svn: 26852 
							
						 
						
							2006-03-19 04:18:56 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								29b2301460 
								
							 
						 
						
							
							
								
								implement basic support for INSERT_VECTOR_ELT.  
							
							 
							
							... 
							
							
							
							llvm-svn: 26849 
							
						 
						
							2006-03-19 01:17:20 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f4e1a53647 
								
							 
						 
						
							
							
								
								Rename ConstantVec -> BUILD_VECTOR and VConstant -> VBUILD_VECTOR.  Allow*BUILD_VECTOR to take variable inputs.  
							
							 
							
							... 
							
							
							
							llvm-svn: 26847 
							
						 
						
							2006-03-19 00:52:58 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c16b05e67d 
								
							 
						 
						
							
							
								
								implement vector.ll:test_undef  
							
							 
							
							... 
							
							
							
							llvm-svn: 26845 
							
						 
						
							2006-03-19 00:20:20 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								93640543a9 
								
							 
						 
						
							
							
								
								Fix the remaining bugs in the vector expansion rework I commited yesterday.  
							
							 
							
							... 
							
							
							
							This fixes CodeGen/Generic/vector.ll
llvm-svn: 26843 
							
						 
						
							2006-03-19 00:07:49 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								32206f54c6 
								
							 
						 
						
							
							
								
								Change the structure of lowering vector stuff.  Note: This breaks some  
							
							 
							
							... 
							
							
							
							things.
llvm-svn: 26840 
							
						 
						
							2006-03-18 01:44:44 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								bb01d4f272 
								
							 
						 
						
							
							
								
								Remove BRTWOWAY*  
							
							 
							
							... 
							
							
							
							Make the PPC backend not dependent on BRTWOWAY_CC and make the branch
selector smarter about the code it generates, fixing a case in the
readme.
llvm-svn: 26814 
							
						 
						
							2006-03-17 01:40:33 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								cad70c3e46 
								
							 
						 
						
							
							
								
								Add a note, this code should be moved to the dag combiner.  
							
							 
							
							... 
							
							
							
							llvm-svn: 26787 
							
						 
						
							2006-03-15 22:19:18 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								994d8e6bd4 
								
							 
						 
						
							
							
								
								For targets with FABS/FNEG support, lower copysign to an integer load,  
							
							 
							
							... 
							
							
							
							a select and FABS/FNEG.
This speeds up a trivial (aka stupid) copysign benchmark I wrote from 6.73s
to 2.64s, woo.
llvm-svn: 26723 
							
						 
						
							2006-03-13 06:08:38 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								3fe975b846 
								
							 
						 
						
							
							
								
								revert the previous patch, didn't mean to check it in yet  
							
							 
							
							... 
							
							
							
							llvm-svn: 26610 
							
						 
						
							2006-03-08 04:39:05 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								af5e26c980 
								
							 
						 
						
							
							
								
								remove "Slot", it is dead  
							
							 
							
							... 
							
							
							
							llvm-svn: 26609 
							
						 
						
							2006-03-08 04:37:58 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5c1ba2ac08 
								
							 
						 
						
							
							
								
								Codegen copysign[f] into a FCOPYSIGN node  
							
							 
							
							... 
							
							
							
							llvm-svn: 26542 
							
						 
						
							2006-03-05 05:09:38 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								3bf916ddd9 
								
							 
						 
						
							
							
								
								Add more vector NodeTypes: VSDIV, VUDIV, VAND, VOR, and VXOR.  
							
							 
							
							... 
							
							
							
							llvm-svn: 26504 
							
						 
						
							2006-03-03 07:01:07 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ad3c974a77 
								
							 
						 
						
							
							
								
								remove the read/write port/io intrinsics.  
							
							 
							
							... 
							
							
							
							llvm-svn: 26479 
							
						 
						
							2006-03-03 00:19:58 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								b97aab4371 
								
							 
						 
						
							
							
								
								Vector ops lowering.  
							
							 
							
							... 
							
							
							
							llvm-svn: 26436 
							
						 
						
							2006-03-01 01:09:54 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								486d1bc5ed 
								
							 
						 
						
							
							
								
								Fix a problem on itanium with memset.  The value to set has been promoted to  
							
							 
							
							... 
							
							
							
							i64 before this code, so zero_ext doesn't work.
llvm-svn: 26290 
							
						 
						
							2006-02-20 06:38:35 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								5965bd19f8 
								
							 
						 
						
							
							
								
								kill ADD_PARTS & SUB_PARTS and replace them with fancy new ADDC, ADDE, SUBC  
							
							 
							
							... 
							
							
							
							and SUBE nodes that actually expose what's going on and allow for
significant simplifications in the targets.
llvm-svn: 26255 
							
						 
						
							2006-02-17 05:43:56 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								9ec392b2aa 
								
							 
						 
						
							
							
								
								Fix another miscompilation exposed by lencode, where we lowered i64->f32  
							
							 
							
							... 
							
							
							
							conversions to __floatdidf instead of __floatdisf on targets that support
f32 but not i64 (e.g. sparc).
llvm-svn: 26254 
							
						 
						
							2006-02-17 04:32:33 +00:00  
						
					 
				
					
						
							
							
								 
								Jim Laskey
							
						 
						
							 
							
							
							
							
								
							
							
								2eea436192 
								
							 
						 
						
							
							
								
								Should not combine ISD::LOCATIONs until we have scheme to remove from  
							
							 
							
							... 
							
							
							
							MachineDebugInfo tables.
llvm-svn: 26216 
							
						 
						
							2006-02-15 19:34:44 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								8e2ee7358f 
								
							 
						 
						
							
							
								
								Fix a latent bug in the call sequence handling stuff.  Some targets (e.g. x86)  
							
							 
							
							... 
							
							
							
							create these nodes with flag results.  Remember that we legalized them.
llvm-svn: 26156 
							
						 
						
							2006-02-14 00:55:02 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								462505fc5f 
								
							 
						 
						
							
							
								
								Completely rewrite libcall insertion by the legalizer, providing the  
							
							 
							
							... 
							
							
							
							following handy-dandy properties:
1. it is always correct now
2. it is much faster than before
3. it is easier to understand
This implementation builds off of the recent simplifications of the
legalizer that made it single-pass instead of iterative.
This fixes JM/lencod, JM/ldecod, and
CodeGen/Generic/2006-02-12-InsertLibcall.ll (at least on PPC).
llvm-svn: 26144 
							
						 
						
							2006-02-13 09:18:02 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								01bd9d9911 
								
							 
						 
						
							
							
								
								*** empty log message ***  
							
							 
							
							... 
							
							
							
							llvm-svn: 25879 
							
						 
						
							2006-02-01 19:05:15 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								7e7f439f85 
								
							 
						 
						
							
							
								
								Fix some of the stuff in the PPC README file, and clean up legalization  
							
							 
							
							... 
							
							
							
							of the SELECT_CC, BR_CC, and BRTWOWAY_CC nodes.
llvm-svn: 25875 
							
						 
						
							2006-02-01 07:19:44 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								2443ab932d 
								
							 
						 
						
							
							
								
								Allow custom lowering of fabs. I forgot to check in this change which  
							
							 
							
							... 
							
							
							
							caused several test failures.
llvm-svn: 25852 
							
						 
						
							2006-01-31 18:14:25 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								e9721b2984 
								
							 
						 
						
							
							
								
								Only insert an AND when converting from BR_COND to BRCC if needed.  
							
							 
							
							... 
							
							
							
							llvm-svn: 25832 
							
						 
						
							2006-01-31 05:04:52 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f263a23735 
								
							 
						 
						
							
							
								
								Fix a bug in my legalizer reworking that caused the X86 backend to not get  
							
							 
							
							... 
							
							
							
							a chance to custom legalize setcc, which broke a bunch of C++ Codes.
Testcase here: CodeGen/X86/2006-01-30-LongSetcc.ll
llvm-svn: 25821 
							
						 
						
							2006-01-30 22:43:50 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								d6f5ae4455 
								
							 
						 
						
							
							
								
								don't insert an and node if it isn't needed here, this can prevent folding  
							
							 
							
							... 
							
							
							
							of lowered target nodes.
llvm-svn: 25804 
							
						 
						
							2006-01-30 04:22:28 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								4d1ea71a31 
								
							 
						 
						
							
							
								
								Fix RET of promoted values on targets that custom expand RET to a target node.  
							
							 
							
							... 
							
							
							
							llvm-svn: 25794 
							
						 
						
							2006-01-29 21:02:23 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2c748afd6c 
								
							 
						 
						
							
							
								
								cleanups to the ValueTypeActions interface  
							
							 
							
							... 
							
							
							
							llvm-svn: 25785 
							
						 
						
							2006-01-29 08:42:06 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ccb4476c87 
								
							 
						 
						
							
							
								
								Remove some special case hacks for CALLSEQ_*, using UpdateNodeOperands  
							
							 
							
							... 
							
							
							
							instead.
llvm-svn: 25780 
							
						 
						
							2006-01-29 07:58:15 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2f292789dc 
								
							 
						 
						
							
							
								
								Allow custom expansion of ConstantVec nodes.  PPC will use this in the future.  
							
							 
							
							... 
							
							
							
							llvm-svn: 25774 
							
						 
						
							2006-01-29 06:34:16 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								758b0ac54b 
								
							 
						 
						
							
							
								
								Legalize ConstantFP into TargetConstantFP when the target allows.  Implement  
							
							 
							
							... 
							
							
							
							custom expansion of ConstantFP nodes.
llvm-svn: 25772 
							
						 
						
							2006-01-29 06:26:56 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								678da98835 
								
							 
						 
						
							
							
								
								eliminate uses of SelectionDAG::getBR2Way_CC  
							
							 
							
							... 
							
							
							
							llvm-svn: 25767 
							
						 
						
							2006-01-29 06:00:45 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								d02b05473c 
								
							 
						 
						
							
							
								
								Use the new "UpdateNodeOperands" method to simplify LegalizeDAG and make it  
							
							 
							
							... 
							
							
							
							faster.  This cuts about 120 lines of code out of the legalizer (mostly code
checking to see if operands have changed).
It also fixes an ugly performance issue, where the legalizer cloned the entire
graph after any change.  Now the "UpdateNodeOperands" method gives it a chance
to reuse nodes if the operands of a node change but not its opcode or valuetypes.
This speeds up instruction selection time on kimwitu++ by about 8.2% with a
release build.
llvm-svn: 25746 
							
						 
						
							2006-01-28 10:58:55 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								eb63751499 
								
							 
						 
						
							
							
								
								minor tweaks  
							
							 
							
							... 
							
							
							
							llvm-svn: 25740 
							
						 
						
							2006-01-28 08:31:04 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								689bdcc9cf 
								
							 
						 
						
							
							
								
								move a bunch of code, no other change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 25739 
							
						 
						
							2006-01-28 08:25:58 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								fcfda5a174 
								
							 
						 
						
							
							
								
								remove a couple more now-extraneous legalizeop's  
							
							 
							
							... 
							
							
							
							llvm-svn: 25738 
							
						 
						
							2006-01-28 08:22:56 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								364b89a784 
								
							 
						 
						
							
							
								
								fix a bug  
							
							 
							
							... 
							
							
							
							llvm-svn: 25737 
							
						 
						
							2006-01-28 07:42:08 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								9dcce6da8e 
								
							 
						 
						
							
							
								
								Several major changes:  
							
							 
							
							... 
							
							
							
							1. Pull out the expand cases for BSWAP and CT* into a separate function,
   reducing the size of LegalizeOp.
2. Fix a bug where expand(bswap i64) was wrong when i64 is legal.
3. Changed LegalizeOp/PromoteOp so that the legalizer never needs to be
   iterative.  It now operates in a single pass over the nodes.
4. Simplify a LOT of code, with a net reduction of ~280 lines.
llvm-svn: 25736 
							
						 
						
							2006-01-28 07:39:30 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								fd4a7f76a9 
								
							 
						 
						
							
							
								
								Eliminate the need for ExpandOp to set 'needsanotheriteration', as it already  
							
							 
							
							... 
							
							
							
							relegalizes the stuff it returns.
Add the ability to custom expand ADD/SUB, so that targets don't need to deal
with ADD_PARTS/SUB_PARTS if they don't want.
Fix some obscure potential bugs and simplify code.
llvm-svn: 25732 
							
						 
						
							2006-01-28 05:07:51 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								10f677508f 
								
							 
						 
						
							
							
								
								Instead of making callers of ExpandLibCall legalize the result, make  
							
							 
							
							... 
							
							
							
							ExpandLibCall do it itself.
llvm-svn: 25731 
							
						 
						
							2006-01-28 04:28:26 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								a593acfe66 
								
							 
						 
						
							
							
								
								Eliminate the need to do another iteration of the legalizer after inserting  
							
							 
							
							... 
							
							
							
							a libcall.
llvm-svn: 25730 
							
						 
						
							2006-01-28 04:23:12 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								595ec734fc 
								
							 
						 
						
							
							
								
								Implement Promote for VAARG, and allow it to be custom promoted for people  
							
							 
							
							... 
							
							
							
							who don't want the default behavior (Alpha).
llvm-svn: 25726 
							
						 
						
							2006-01-28 03:14:31 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								fb16a62fba 
								
							 
						 
						
							
							
								
								Remove the ISD::CALL and ISD::TAILCALL nodes  
							
							 
							
							... 
							
							
							
							llvm-svn: 25721 
							
						 
						
							2006-01-28 00:18:58 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								476e67be14 
								
							 
						 
						
							
							
								
								initial selectiondag support for new INLINEASM node.  Note that inline asms  
							
							 
							
							... 
							
							
							
							with outputs or inputs are not supported yet. :)
llvm-svn: 25664 
							
						 
						
							2006-01-26 22:24:51 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								e74795cd70 
								
							 
						 
						
							
							
								
								First part of bug 680:  
							
							 
							
							... 
							
							
							
							Remove TLI.LowerVA* and replace it with SDNodes that are lowered the same
way as everything else.
llvm-svn: 25606 
							
						 
						
							2006-01-25 18:21:52 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f9a1e3aadc 
								
							 
						 
						
							
							
								
								Fix an infinite loop I caused by making sure to legalize the flag operand  
							
							 
							
							... 
							
							
							
							of CALLSEQ_* nodes
llvm-svn: 25582 
							
						 
						
							2006-01-24 05:48:21 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								763dfd7723 
								
							 
						 
						
							
							
								
								Fix Regression/CodeGen/SparcV8/2006-01-22-BitConvertLegalize.ll by making  
							
							 
							
							... 
							
							
							
							sure that the result of expanding a BIT_CONVERT node is itself legalized.
llvm-svn: 25538 
							
						 
						
							2006-01-23 07:30:46 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								44cab00045 
								
							 
						 
						
							
							
								
								Fix CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll  
							
							 
							
							... 
							
							
							
							llvm-svn: 25496 
							
						 
						
							2006-01-21 04:27:00 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								15afe462a8 
								
							 
						 
						
							
							
								
								remove some unintentionally committed code  
							
							 
							
							... 
							
							
							
							llvm-svn: 25483 
							
						 
						
							2006-01-20 18:40:10 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								222ceabbee 
								
							 
						 
						
							
							
								
								If the target doesn't support f32 natively, insert the FP_EXTEND in target-indep  
							
							 
							
							... 
							
							
							
							code, so that the LowerReturn code doesn't have to handle it.
llvm-svn: 25482 
							
						 
						
							2006-01-20 18:38:32 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								13e8c9d6de 
								
							 
						 
						
							
							
								
								Another typo  
							
							 
							
							... 
							
							
							
							llvm-svn: 25440 
							
						 
						
							2006-01-19 04:54:52 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								7599b6e4af 
								
							 
						 
						
							
							
								
								was ignoring the legalized chain in this case, fixed SPASS on alpha  
							
							 
							
							... 
							
							
							
							llvm-svn: 25428 
							
						 
						
							2006-01-18 23:19:08 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								6f86a7db07 
								
							 
						 
						
							
							
								
								Bug fix: missing LegalizeOp() on newly created nodes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 25401 
							
						 
						
							2006-01-17 19:47:13 +00:00  
						
					 
				
					
						
							
							
								 
								Jim Laskey
							
						 
						
							 
							
							
							
							
								
							
							
								b9966029fe 
								
							 
						 
						
							
							
								
								Adding basic support for Dwarf line number debug information.  
							
							 
							
							... 
							
							
							
							I promise to keep future commits smaller.
llvm-svn: 25396 
							
						 
						
							2006-01-17 17:31:53 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								2642a35f4c 
								
							 
						 
						
							
							
								
								Expand case for 64b Legalize, even though no one should end up using this  
							
							 
							
							... 
							
							
							
							(itanium supports bswap natively, alpha should custom lower it using the
VAX floating point swapload, ha ha).
llvm-svn: 25356 
							
						 
						
							2006-01-16 07:59:13 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								59b82f9848 
								
							 
						 
						
							
							
								
								Allow the target to specify 'expand' if they just require the amount to  
							
							 
							
							... 
							
							
							
							be subtracted from the stack pointer.
llvm-svn: 25331 
							
						 
						
							2006-01-15 08:54:32 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2d59142613 
								
							 
						 
						
							
							
								
								Fix custom lowering of dynamic_stackalloc  
							
							 
							
							... 
							
							
							
							llvm-svn: 25329 
							
						 
						
							2006-01-15 08:43:08 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								02011c9a4f 
								
							 
						 
						
							
							
								
								Token chain results are not always the first or last result.  Consider copyfromreg nodes, where they are the middle result (the flag result is last)  
							
							 
							
							... 
							
							
							
							llvm-svn: 25325 
							
						 
						
							2006-01-14 22:41:46 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								2fba8a3aaa 
								
							 
						 
						
							
							
								
								bswap implementation  
							
							 
							
							... 
							
							
							
							llvm-svn: 25312 
							
						 
						
							2006-01-14 03:14:10 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ed9b3e1c0a 
								
							 
						 
						
							
							
								
								If a target specified a stack pointer with setStackPointerRegisterToSaveRestore,  
							
							 
							
							... 
							
							
							
							lower STACKSAVE/STACKRESTORE into a copy from/to that register.
llvm-svn: 25276 
							
						 
						
							2006-01-13 17:48:44 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								b32664583b 
								
							 
						 
						
							
							
								
								Compile llvm.stacksave/restore into STACKSAVE/STACKRESTORE nodes, and allow  
							
							 
							
							... 
							
							
							
							targets to custom expand them as they desire.
llvm-svn: 25273 
							
						 
						
							2006-01-13 02:50:02 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								7f4ec8274f 
								
							 
						 
						
							
							
								
								Allow custom lowering of DYNAMIC_STACKALLOC.  
							
							 
							
							... 
							
							
							
							llvm-svn: 25224 
							
						 
						
							2006-01-11 22:14:47 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								1b8121b227 
								
							 
						 
						
							
							
								
								Add bswap, rotl, and rotr nodes  
							
							 
							
							... 
							
							
							
							Add dag combiner code to recognize rotl, rotr
Add ppc code to match rotl
Targets should add rotl/rotr patterns if they have them
llvm-svn: 25222 
							
						 
						
							2006-01-11 21:21:00 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								fb5f46541c 
								
							 
						 
						
							
							
								
								silence a warning  
							
							 
							
							... 
							
							
							
							llvm-svn: 25184 
							
						 
						
							2006-01-10 19:43:26 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								90ba544826 
								
							 
						 
						
							
							
								
								Fix an exponential function in libcall insertion to not be exponential. :)  
							
							 
							
							... 
							
							
							
							llvm-svn: 25165 
							
						 
						
							2006-01-09 23:21:49 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								870e4f8e38 
								
							 
						 
						
							
							
								
								* Allow custom lowering of ADD_PARTS, SUB_PARTS, SHL_PARTS, SRA_PARTS,  
							
							 
							
							... 
							
							
							
							and SRL_PARTS.
* Fix a bug that caused *_PARTS to be custom lowered twice.
llvm-svn: 25157 
							
						 
						
							2006-01-09 18:31:59 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								fae8afb77f 
								
							 
						 
						
							
							
								
								Unbreak the build :(  
							
							 
							
							... 
							
							
							
							llvm-svn: 25124 
							
						 
						
							2006-01-06 05:47:48 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								f35b1c837f 
								
							 
						 
						
							
							
								
								Support for custom lowering of ISD::RET.  
							
							 
							
							... 
							
							
							
							llvm-svn: 25116 
							
						 
						
							2006-01-06 00:41:43 +00:00  
						
					 
				
					
						
							
							
								 
								Jim Laskey
							
						 
						
							 
							
							
							
							
								
							
							
								762e9ec06c 
								
							 
						 
						
							
							
								
								Added initial support for DEBUG_LABEL allowing debug specific labels to be  
							
							 
							
							... 
							
							
							
							inserted in the code.
llvm-svn: 25104 
							
						 
						
							2006-01-05 01:25:28 +00:00  
						
					 
				
					
						
							
							
								 
								Jim Laskey
							
						 
						
							 
							
							
							
							
								
							
							
								219d559824 
								
							 
						 
						
							
							
								
								Applied some recommend changes from sabre.  The dominate one beginning "let the  
							
							 
							
							... 
							
							
							
							pass manager do it's thing."  Fixes crash when compiling -g files and suppresses
dwarf statements if no debug info is present.
llvm-svn: 25100 
							
						 
						
							2006-01-04 22:28:25 +00:00  
						
					 
				
					
						
							
							
								 
								Jim Laskey
							
						 
						
							 
							
							
							
							
								
							
							
								0da76a676a 
								
							 
						 
						
							
							
								
								Add unique id to debug location for debug label use (work in progress.)  
							
							 
							
							... 
							
							
							
							llvm-svn: 25096 
							
						 
						
							2006-01-04 15:04:11 +00:00  
						
					 
				
					
						
							
							
								 
								Jim Laskey
							
						 
						
							 
							
							
							
							
								
							
							
								6f9ff633a6 
								
							 
						 
						
							
							
								
								Change how MachineDebugInfo is fetched.  
							
							 
							
							... 
							
							
							
							llvm-svn: 25089 
							
						 
						
							2006-01-04 13:42:59 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								30db2ec59f 
								
							 
						 
						
							
							
								
								allow custom lowering to return null for legal results  
							
							 
							
							... 
							
							
							
							llvm-svn: 25007 
							
						 
						
							2005-12-25 01:07:37 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								7259426d88 
								
							 
						 
						
							
							
								
								Support Custom lowering of a few more operations.  
							
							 
							
							... 
							
							
							
							Alpha needs to custom lower *DIV and *REM
llvm-svn: 25006 
							
						 
						
							2005-12-24 23:42:32 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c7037abc5b 
								
							 
						 
						
							
							
								
								unbreak the build :-/  
							
							 
							
							... 
							
							
							
							llvm-svn: 24992 
							
						 
						
							2005-12-23 16:12:20 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								31d15fa093 
								
							 
						 
						
							
							
								
								Allow custom lowering of LOAD, EXTLOAD, ZEXTLOAD, STORE, and TRUNCSTORE. Not  
							
							 
							
							... 
							
							
							
							currently used.
llvm-svn: 24988 
							
						 
						
							2005-12-23 07:29:34 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								884eb3adc3 
								
							 
						 
						
							
							
								
								Fix a pasto  
							
							 
							
							... 
							
							
							
							llvm-svn: 24973 
							
						 
						
							2005-12-23 00:52:30 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								9eae8d5d03 
								
							 
						 
						
							
							
								
								fix a thinko in the bit_convert handling code  
							
							 
							
							... 
							
							
							
							llvm-svn: 24972 
							
						 
						
							2005-12-23 00:50:25 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								36e663d6e1 
								
							 
						 
						
							
							
								
								add very simple support for the BIT_CONVERT node  
							
							 
							
							... 
							
							
							
							llvm-svn: 24970 
							
						 
						
							2005-12-23 00:16:34 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								177d7af5d5 
								
							 
						 
						
							
							
								
								remove dead code  
							
							 
							
							... 
							
							
							
							llvm-svn: 24965 
							
						 
						
							2005-12-22 21:16:08 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								1408c05a8b 
								
							 
						 
						
							
							
								
								The 81st column doesn't like code in it.  
							
							 
							
							... 
							
							
							
							llvm-svn: 24943 
							
						 
						
							2005-12-22 05:23:45 +00:00  
						
					 
				
					
						
							
							
								 
								Jim Laskey
							
						 
						
							 
							
							
							
							
								
							
							
								9e296bee9a 
								
							 
						 
						
							
							
								
								Disengage DEBUG_LOC from non-PPC targets.  
							
							 
							
							... 
							
							
							
							llvm-svn: 24919 
							
						 
						
							2005-12-21 20:51:37 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								c1583dbd63 
								
							 
						 
						
							
							
								
								* Added support for X86 RET with an additional operand to specify number of  
							
							 
							
							... 
							
							
							
							bytes to pop off stack.
* Added support for X86 SETCC.
llvm-svn: 24917 
							
						 
						
							2005-12-21 20:21:51 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								0fab459362 
								
							 
						 
						
							
							
								
								make sure to relegalize all cases  
							
							 
							
							... 
							
							
							
							llvm-svn: 24911 
							
						 
						
							2005-12-21 19:40:42 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ac12f68424 
								
							 
						 
						
							
							
								
								fix a bug I introduced that broke recursive expansion of nodes (e.g. scalarizing vectors)  
							
							 
							
							... 
							
							
							
							llvm-svn: 24905 
							
						 
						
							2005-12-21 18:02:52 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2af3ee4bdd 
								
							 
						 
						
							
							
								
								Fix a nasty latent bug in the legalizer that was triggered by my patch  
							
							 
							
							... 
							
							
							
							last night, breaking crafty and twolf.  Make sure that the newly found
legal nodes are themselves not re-legalized until the next iteration.
Also, since this functionality exists now, we can reduce number of legalizer
iterations by depending on this behavior instead of having to misuse 'do
another iteration' to get the same effect.
llvm-svn: 24875 
							
						 
						
							2005-12-20 00:53:54 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								6fc31046aa 
								
							 
						 
						
							
							
								
								X86 conditional branch support.  
							
							 
							
							... 
							
							
							
							llvm-svn: 24870 
							
						 
						
							2005-12-19 23:12:38 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c06da626b4 
								
							 
						 
						
							
							
								
								Make sure to relegalize new nodes  
							
							 
							
							... 
							
							
							
							llvm-svn: 24843 
							
						 
						
							2005-12-18 23:54:29 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ebcfa0c210 
								
							 
						 
						
							
							
								
								More corrections for flagged copyto/from reg  
							
							 
							
							... 
							
							
							
							llvm-svn: 24828 
							
						 
						
							2005-12-18 15:36:21 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								e3c67e97c7 
								
							 
						 
						
							
							
								
								legalize copytoreg and copyfromreg nodes that have flag operands correctly.  
							
							 
							
							... 
							
							
							
							llvm-svn: 24826 
							
						 
						
							2005-12-18 15:27:43 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								bf0bd99e03 
								
							 
						 
						
							
							
								
								allow custom expansion of BR_CC  
							
							 
							
							... 
							
							
							
							llvm-svn: 24804 
							
						 
						
							2005-12-17 23:46:46 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								225a4d0d6d 
								
							 
						 
						
							
							
								
								X86 lowers SELECT to a cmp / test followed by a conditional move.  
							
							 
							
							... 
							
							
							
							llvm-svn: 24754 
							
						 
						
							2005-12-17 01:21:05 +00:00  
						
					 
				
					
						
							
							
								 
								Jim Laskey
							
						 
						
							 
							
							
							
							
								
							
							
								7c462768ed 
								
							 
						 
						
							
							
								
								Added source file/line correspondence for dwarf (PowerPC only at this point.)  
							
							 
							
							... 
							
							
							
							llvm-svn: 24748 
							
						 
						
							2005-12-16 22:45:29 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								956aef45c9 
								
							 
						 
						
							
							
								
								Lowering constant pool entries on ppc exposed a bug in the recently added  
							
							 
							
							... 
							
							
							
							ConstantVec legalizing code, which would return constantpool nodes that
were not of the target's pointer type.
llvm-svn: 24691 
							
						 
						
							2005-12-13 03:03:23 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								b42ce7ca63 
								
							 
						 
						
							
							
								
								Fix CodeGen/Generic/2005-12-12-ExpandSextInreg.ll  
							
							 
							
							... 
							
							
							
							llvm-svn: 24677 
							
						 
						
							2005-12-12 22:27:43 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								4e56db674c 
								
							 
						 
						
							
							
								
								Add support for TargetConstantPool nodes to the dag isel emitter, and use  
							
							 
							
							... 
							
							
							
							them in the PPC backend, to simplify some logic out of Select and
SelectAddr.
llvm-svn: 24657 
							
						 
						
							2005-12-10 02:36:00 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								268d457b69 
								
							 
						 
						
							
							
								
								Teach legalize how to promote sext_inreg to fix a problem Andrew pointed  
							
							 
							
							... 
							
							
							
							out to me.
llvm-svn: 24644 
							
						 
						
							2005-12-09 17:32:47 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								ae89d862f5 
								
							 
						 
						
							
							
								
								Fix a crash where ConstantVec nodes were being generated with the wrong  
							
							 
							
							... 
							
							
							
							type when the target did not support them.  Also teach Legalize how to
expand ConstantVecs.
This allows us to generate
_test:
        lwz r2, 12(r3)
        lwz r4, 8(r3)
        lwz r5, 4(r3)
        lwz r6, 0(r3)
        addi r2, r2, 4
        addi r4, r4, 3
        addi r5, r5, 2
        addi r6, r6, 1
        stw r2, 12(r3)
        stw r4, 8(r3)
        stw r5, 4(r3)
        stw r6, 0(r3)
        blr
For:
void %test(%v4i *%P) {
        %T = load %v4i* %P
        %S = add %v4i %T, <int 1, int 2, int 3, int 4>
        store %v4i %S, %v4i * %P
        ret void
}
On PowerPC.
llvm-svn: 24633 
							
						 
						
							2005-12-07 19:48:11 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								41b1cdc771 
								
							 
						 
						
							
							
								
								Teach the SelectionDAG ISel how to turn ConstantPacked values into  
							
							 
							
							... 
							
							
							
							constant nodes with vector types.  Also teach the asm printer how to print
ConstantPacked constant pool entries.  This allows us to generate altivec
code such as the following, which adds a vector constantto a packed float.
LCPI1_0:  <4 x float> < float 0.0e+0, float 0.0e+0, float 0.0e+0, float 1.0e+0 >
        .space  4
        .space  4
        .space  4
        .long   1065353216      ; float 1
        .text
        .align  4
        .globl  _foo
_foo:
        lis r2, ha16(LCPI1_0)
        la r2, lo16(LCPI1_0)(r2)
        li r4, 0
        lvx v0, r4, r2
        lvx v1, r4, r3
        vaddfp v0, v1, v0
        stvx v0, r4, r3
        blr
For the llvm code:
void %foo(<4 x float> * %a) {
entry:
  %tmp1 = load <4 x float> * %a;
  %tmp2 = add <4 x float> %tmp1, < float 0.0, float 0.0, float 0.0, float 1.0 >
  store <4 x float> %tmp2, <4 x float> *%a
  ret void
}
llvm-svn: 24616 
							
						 
						
							2005-12-06 06:18:55 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								f9b27d7011 
								
							 
						 
						
							
							
								
								bah, must generate all results  
							
							 
							
							... 
							
							
							
							llvm-svn: 24574 
							
						 
						
							2005-12-02 06:08:08 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								73420b3795 
								
							 
						 
						
							
							
								
								cycle counter fix  
							
							 
							
							... 
							
							
							
							llvm-svn: 24573 
							
						 
						
							2005-12-02 04:56:24 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								05b0b4575b 
								
							 
						 
						
							
							
								
								Promote line and column number information for our friendly 64-bit targets.  
							
							 
							
							... 
							
							
							
							llvm-svn: 24568 
							
						 
						
							2005-12-01 18:21:35 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								6ee8566cae 
								
							 
						 
						
							
							
								
								At long last, you can say that f32 isn't supported for setcc  
							
							 
							
							... 
							
							
							
							llvm-svn: 24537 
							
						 
						
							2005-11-30 17:12:26 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								8d17c70171 
								
							 
						 
						
							
							
								
								add support for custom lowering SINT_TO_FP  
							
							 
							
							... 
							
							
							
							llvm-svn: 24531 
							
						 
						
							2005-11-30 06:43:03 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								435b402e1f 
								
							 
						 
						
							
							
								
								Add support for a new STRING and LOCATION node for line number support, patch  
							
							 
							
							... 
							
							
							
							contributed by Daniel Berlin, with a few cleanups here and there by me.
llvm-svn: 24515 
							
						 
						
							2005-11-29 06:21:05 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								89b049af90 
								
							 
						 
						
							
							
								
								Add the majority of the vector machien value types we expect to support,  
							
							 
							
							... 
							
							
							
							and make a few changes to the legalization machinery to support more than
16 types.
llvm-svn: 24511 
							
						 
						
							2005-11-29 05:45:29 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								d37c13154a 
								
							 
						 
						
							
							
								
								Check in code to scalarize arbitrarily wide packed types for some simple  
							
							 
							
							... 
							
							
							
							vector operations (load, add, sub, mul).
This allows us to codegen:
void %foo(<4 x float> * %a) {
entry:
  %tmp1 = load <4 x float> * %a;
  %tmp2 = add <4 x float> %tmp1, %tmp1
  store <4 x float> %tmp2, <4 x float> *%a
  ret void
}
on ppc as:
_foo:
        lfs f0, 12(r3)
        lfs f1, 8(r3)
        lfs f2, 4(r3)
        lfs f3, 0(r3)
        fadds f0, f0, f0
        fadds f1, f1, f1
        fadds f2, f2, f2
        fadds f3, f3, f3
        stfs f0, 12(r3)
        stfs f1, 8(r3)
        stfs f2, 4(r3)
        stfs f3, 0(r3)
        blr
llvm-svn: 24484 
							
						 
						
							2005-11-22 18:16:00 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								07890bbec4 
								
							 
						 
						
							
							
								
								Rather than attempting to legalize 1 x float, make sure the SD ISel never  
							
							 
							
							... 
							
							
							
							generates it.  Make MVT::Vector expand-only, and remove the code in
Legalize that attempts to legalize it.
The plan for supporting N x Type is to continually epxand it in ExpandOp
until it gets down to 2 x Type, where it will be scalarized into a pair of
scalars.
llvm-svn: 24482 
							
						 
						
							2005-11-22 01:29:36 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								44c28c22b7 
								
							 
						 
						
							
							
								
								Legalize MERGE_VALUES, expand READCYCLECOUNTER correctly, so it doesn't  
							
							 
							
							... 
							
							
							
							break control dependence.
llvm-svn: 24437 
							
						 
						
							2005-11-20 22:56:56 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								627cbd49b1 
								
							 
						 
						
							
							
								
								The first patch of X86 support for read cycle counter  
							
							 
							
							... 
							
							
							
							llvm-svn: 24429 
							
						 
						
							2005-11-20 21:32:07 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								301015a703 
								
							 
						 
						
							
							
								
								Silence a bogus warning  
							
							 
							
							... 
							
							
							
							llvm-svn: 24420 
							
						 
						
							2005-11-19 05:51:46 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								b2e089c31b 
								
							 
						 
						
							
							
								
								Teach LLVM how to scalarize packed types.  Currently, this only works on  
							
							 
							
							... 
							
							
							
							packed types with an element count of 1, although more generic support is
coming.  This allows LLVM to turn the following code:
void %foo(<1 x float> * %a) {
entry:
  %tmp1 = load <1 x float> * %a;
  %tmp2 = add <1 x float> %tmp1, %tmp1
  store <1 x float> %tmp2, <1 x float> *%a
  ret void
}
Into:
_foo:
        lfs f0, 0(r3)
        fadds f0, f0, f0
        stfs f0, 0(r3)
        blr
llvm-svn: 24416 
							
						 
						
							2005-11-19 00:36:38 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								45ca1c0194 
								
							 
						 
						
							
							
								
								Allow targets to custom legalize leaf nodes like GlobalAddress.  
							
							 
							
							... 
							
							
							
							llvm-svn: 24387 
							
						 
						
							2005-11-17 06:41:44 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								4ff65ec745 
								
							 
						 
						
							
							
								
								Teach legalize about targetglobaladdress  
							
							 
							
							... 
							
							
							
							llvm-svn: 24385 
							
						 
						
							2005-11-17 05:52:24 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								01aa56397d 
								
							 
						 
						
							
							
								
								continued readcyclecounter support  
							
							 
							
							... 
							
							
							
							llvm-svn: 24300 
							
						 
						
							2005-11-11 16:47:30 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								bf4f233214 
								
							 
						 
						
							
							
								
								Switch the allnodes list from a vector of pointers to an ilist of nodes.This eliminates the vector, allows constant time removal of a node froma graph, and makes iteration over the all nodes list stable when adding  
							
							 
							
							... 
							
							
							
							nodes to the graph.
llvm-svn: 24263 
							
						 
						
							2005-11-09 23:47:37 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								af3aefa10e 
								
							 
						 
						
							
							
								
								Handle the trivial (but common) two-op case more efficiently  
							
							 
							
							... 
							
							
							
							llvm-svn: 24259 
							
						 
						
							2005-11-09 18:48:57 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c4d6050db6 
								
							 
						 
						
							
							
								
								Allocate the right amount of memory for this vector up front.  
							
							 
							
							... 
							
							
							
							llvm-svn: 24252 
							
						 
						
							2005-11-08 23:32:44 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								d8f2a1a0f3 
								
							 
						 
						
							
							
								
								Allow custom lowered FP_TO_SINT ops in the check for whether a larger  
							
							 
							
							... 
							
							
							
							FP_TO_SINT is preferred to a larger FP_TO_UINT.  This seems to be begging
for a TLI.isOperationCustom() helper function.
llvm-svn: 23992 
							
						 
						
							2005-10-25 23:47:25 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								5172ce641e 
								
							 
						 
						
							
							
								
								Teach Legalize how to do something with EXTRACT_ELEMENT when the type of  
							
							 
							
							... 
							
							
							
							the pair of elements is a legal type.
llvm-svn: 23804 
							
						 
						
							2005-10-19 00:06:56 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								bd5f41a6a6 
								
							 
						 
						
							
							
								
								Legalize BUILD_PAIR appropriately for upcoming 64 bit PowerPC work.  
							
							 
							
							... 
							
							
							
							llvm-svn: 23776 
							
						 
						
							2005-10-18 00:27:41 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								b986f471be 
								
							 
						 
						
							
							
								
								Use getExtLoad here instead of getNode, as extloads produce two values.  This  
							
							 
							
							... 
							
							
							
							fixes a legalize failure on SPASS for itanium.
llvm-svn: 23747 
							
						 
						
							2005-10-15 20:24:07 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								d59e5a7abb 
								
							 
						 
						
							
							
								
								Relax the checking on zextload generation a bit, since as sabre pointed out  
							
							 
							
							... 
							
							
							
							you could be AND'ing with the result of a shift that shifts out all the
bits you care about, in addition to a constant.
Also, move over an add/sub_parts fold from legalize to the dag combiner,
where it works for things other than constants.  Woot!
llvm-svn: 23720 
							
						 
						
							2005-10-14 01:12:21 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								258521d7ea 
								
							 
						 
						
							
							
								
								When ExpandOp'ing a [SZ]EXTLOAD, make sure to remember that the chain  
							
							 
							
							... 
							
							
							
							is also legal.  Add support for ExpandOp'ing raw EXTLOADs too.
llvm-svn: 23716 
							
						 
						
							2005-10-13 21:44:47 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								d23f4b7411 
								
							 
						 
						
							
							
								
								Implement PromoteOp for *EXTLOAD, allowing MallocBench/gs to Legalize  
							
							 
							
							... 
							
							
							
							llvm-svn: 23715 
							
						 
						
							2005-10-13 20:07:41 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								c3a89c5259 
								
							 
						 
						
							
							
								
								Add support to Legalize for expanding i64 sextload/zextload into hi and lo  
							
							 
							
							... 
							
							
							
							parts. This should fix the crafty and signed long long unit test failure
on x86 last night.
llvm-svn: 23711 
							
						 
						
							2005-10-13 17:15:37 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								02b23c6065 
								
							 
						 
						
							
							
								
								Move some Legalize functionality over to the DAGCombiner where it belongs.  
							
							 
							
							... 
							
							
							
							Kill some dead code.
llvm-svn: 23706 
							
						 
						
							2005-10-13 03:11:28 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								7bf8d06f02 
								
							 
						 
						
							
							
								
								silence a bogus GCC warning  
							
							 
							
							... 
							
							
							
							llvm-svn: 23646 
							
						 
						
							2005-10-06 17:39:10 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								4bbbb9eed7 
								
							 
						 
						
							
							
								
								Make the legalizer completely non-recursive  
							
							 
							
							... 
							
							
							
							llvm-svn: 23642 
							
						 
						
							2005-10-06 01:20:27 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								f8221c5e2c 
								
							 
						 
						
							
							
								
								Remove some bad code from Legalize  
							
							 
							
							... 
							
							
							
							llvm-svn: 23640 
							
						 
						
							2005-10-05 21:44:10 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								5da6908d65 
								
							 
						 
						
							
							
								
								Fix some faulty logic in the libcall inserter.  
							
							 
							
							... 
							
							
							
							Since calls return more than one value, don't bail if one of their uses
happens to be a node that's not an MVT::Other when following the chain
from CALLSEQ_START to CALLSEQ_END.
Once we've found a CALLSEQ_START, we can just return; there's no need to
tail-recurse further up the graph.
Most importantly, just because something only has one use doesn't mean we
should use it's one use to follow from start to end.  This faulty logic
caused us to follow a chain of one-use FP operations back to a much earlier
call, putting a cycle in the graph from a later start to an earlier end.
This is a better fix that reverting to the workaround committed earlier
today.
llvm-svn: 23620 
							
						 
						
							2005-10-04 02:10:55 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								54fb5002e5 
								
							 
						 
						
							
							
								
								Add back a workaround that fixes some breakages from chris's last change.  
							
							 
							
							... 
							
							
							
							Neither of us have yet figured out why this code is necessary, but stuff
breaks if its not there.  Still tracking this down...
llvm-svn: 23617 
							
						 
						
							2005-10-04 00:37:37 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								9cfccfb517 
								
							 
						 
						
							
							
								
								Fix a problem where the legalizer would run out of stack space on extremely  
							
							 
							
							... 
							
							
							
							large basic blocks because it was purely recursive.  This switches it to an
iterative/recursive hybrid.
llvm-svn: 23596 
							
						 
						
							2005-10-02 17:49:46 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5b2be1f890 
								
							 
						 
						
							
							
								
								Fix two bugs in my patch earlier today that broke int->fp conversion on X86.  
							
							 
							
							... 
							
							
							
							llvm-svn: 23522 
							
						 
						
							2005-09-29 06:44:39 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								6f3b577ee6 
								
							 
						 
						
							
							
								
								Add FP versions of the binary operators, keeping the int and fp worlds seperate.  
							
							 
							
							... 
							
							
							
							Though I have done extensive testing, it is possible that this will break
things in configs I can't test.  Please let me know if this causes a problem
and I'll fix it ASAP.
llvm-svn: 23504 
							
						 
						
							2005-09-28 22:28:18 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2d454bf5be 
								
							 
						 
						
							
							
								
								Allow targets to say they don't support truncstore i1 (which includes a mask  
							
							 
							
							... 
							
							
							
							when storing to an 8-bit memory location), as most don't.
llvm-svn: 23303 
							
						 
						
							2005-09-10 00:20:18 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								1a570f1fe4 
								
							 
						 
						
							
							
								
								Clean up some code from the last checkin  
							
							 
							
							... 
							
							
							
							llvm-svn: 23229 
							
						 
						
							2005-09-02 20:32:45 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								630226697f 
								
							 
						 
						
							
							
								
								Fix a bug in legalize where it would emit two calls to libcalls that return  
							
							 
							
							... 
							
							
							
							i64 values on targets that need that expanded to 32-bit registers.  This fixes
PowerPC/2005-09-02-LegalizeDuplicatesCalls.ll and speeds up 189.lucas from
taking 122.72s to 81.96s on my desktop.
llvm-svn: 23228 
							
						 
						
							2005-09-02 20:26:58 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								d9af1aab51 
								
							 
						 
						
							
							
								
								Make sure to legalize assert[zs]ext's operand correctly  
							
							 
							
							... 
							
							
							
							llvm-svn: 23208 
							
						 
						
							2005-09-02 01:15:01 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								7753f175e6 
								
							 
						 
						
							
							
								
								legalize ANY_EXTEND appropriately  
							
							 
							
							... 
							
							
							
							llvm-svn: 23204 
							
						 
						
							2005-09-02 00:18:10 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								8a1a5f2818 
								
							 
						 
						
							
							
								
								Allow targets to custom expand shifts that are too large for their registers  
							
							 
							
							... 
							
							
							
							llvm-svn: 23173 
							
						 
						
							2005-08-31 19:01:53 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								61d21b1f3c 
								
							 
						 
						
							
							
								
								Fix FreeBench/fourinarow with the dag isel, by not adding a bogus result  
							
							 
							
							... 
							
							
							
							to SHIFT_PARTS nodes
llvm-svn: 23151 
							
						 
						
							2005-08-30 17:21:17 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								9a4ad487f0 
								
							 
						 
						
							
							
								
								Fix a miscompile of PtrDist/bc.  Sign extending bools is not the right thing,  
							
							 
							
							... 
							
							
							
							at least tends to expose problems elsewhere.
llvm-svn: 23149 
							
						 
						
							2005-08-30 16:56:19 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								43144a2fe0 
								
							 
						 
						
							
							
								
								Add support for AssertSext and AssertZext, folding other extensions with  
							
							 
							
							... 
							
							
							
							them.  This allows for elminination of redundant extends in the entry
blocks of functions on PowerPC.
Add support for i32 x i32 -> i64 multiplies, by recognizing when the inputs
to ISD::MUL in ExpandOp are actually just extended i32 values and not real
i64 values.  this allows us to codegen
int mulhs(int a, int b) { return ((long long)a * b) >> 32; }
as:
_mulhs:
        mulhw r3, r4, r3
        blr
instead of:
_mulhs:
        mulhwu r2, r4, r3
        srawi r5, r3, 31
        mullw r5, r4, r5
        add r2, r2, r5
        srawi r4, r4, 31
        mullw r3, r4, r3
        add r3, r2, r3
        blr
with a similar improvement on x86.
llvm-svn: 23147 
							
						 
						
							2005-08-30 02:44:00 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								835cbb364d 
								
							 
						 
						
							
							
								
								Some of us cared about the the promote path  
							
							 
							
							... 
							
							
							
							llvm-svn: 23130 
							
						 
						
							2005-08-29 20:46:51 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								dcde1b2b6a 
								
							 
						 
						
							
							
								
								Fix an infinite loop on x86  
							
							 
							
							... 
							
							
							
							llvm-svn: 23129 
							
						 
						
							2005-08-29 17:30:00 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								56ca46ee04 
								
							 
						 
						
							
							
								
								Nate noticed that Andrew never did this.  This fixes PR600  
							
							 
							
							... 
							
							
							
							llvm-svn: 23110 
							
						 
						
							2005-08-26 22:50:40 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c30405e0ee 
								
							 
						 
						
							
							
								
								Change ConstantPoolSDNode to actually hold the Constant itself instead of  
							
							 
							
							... 
							
							
							
							putting it into the constant pool.  This allows the isel machinery to
create constants that it will end up deciding are not needed, without them
ending up in the resultant function constant pool.
llvm-svn: 23081 
							
						 
						
							2005-08-26 17:15:30 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c6d481db7a 
								
							 
						 
						
							
							
								
								the 5th operand is the 4th number  
							
							 
							
							... 
							
							
							
							llvm-svn: 23074 
							
						 
						
							2005-08-26 00:43:46 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5f573416cd 
								
							 
						 
						
							
							
								
								Add support for targets that want to custom expand select_cc in some cases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 23071 
							
						 
						
							2005-08-26 00:23:59 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								dff50cadaa 
								
							 
						 
						
							
							
								
								Allow LowerOperation to return a null SDOperand in case it wants to lower  
							
							 
							
							... 
							
							
							
							some things given to it, but not all.
llvm-svn: 23070 
							
						 
						
							2005-08-26 00:14:16 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f12eb4d676 
								
							 
						 
						
							
							
								
								Start using isOperationLegal and isTypeLegal to simplify the code  
							
							 
							
							... 
							
							
							
							llvm-svn: 23012 
							
						 
						
							2005-08-24 16:35:28 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								987121a61a 
								
							 
						 
						
							
							
								
								Teach Legalize how to turn setcc into select_cc  
							
							 
							
							... 
							
							
							
							llvm-svn: 22977 
							
						 
						
							2005-08-23 04:29:48 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								539c3fa863 
								
							 
						 
						
							
							
								
								When legalizing brcond ->brcc or select -> selectcc, make sure to truncate  
							
							 
							
							... 
							
							
							
							the old condition to a one bit value.  The incoming value must have been
promoted, and the top bits are undefined.  This causes us to generate:
_test:
        rlwinm r2, r3, 0, 31, 31
        li r3, 17
        cmpwi cr0, r2, 0
        bne .LBB_test_2 ;
.LBB_test_1:    ;
        li r3, 1
.LBB_test_2:    ;
        blr
instead of:
_test:
        rlwinm r2, r3, 0, 31, 31
        li r2, 17
        cmpwi cr0, r3, 0
        bne .LBB_test_2 ;
.LBB_test_1:    ;
        li r2, 1
.LBB_test_2:    ;
        or r3, r2, r2
        blr
for:
int %test(bool %c) {
        %retval = select bool %c, int 17, int 1
        ret int %retval
}
llvm-svn: 22947 
							
						 
						
							2005-08-21 18:03:09 +00:00  
						
					 
				
					
						
							
							
								 
								Jim Laskey
							
						 
						
							 
							
							
							
							
								
							
							
								b74c666186 
								
							 
						 
						
							
							
								
								Culling out use of unions for converting FP to bits and vice versa.  
							
							 
							
							... 
							
							
							
							llvm-svn: 22838 
							
						 
						
							2005-08-17 19:34:49 +00:00  
						
					 
				
					
						
							
							
								 
								Jim Laskey
							
						 
						
							 
							
							
							
							
								
							
							
								686d6a1cb2 
								
							 
						 
						
							
							
								
								Switched to using BitsToDouble for int_to_float to avoid aliasing problem.  
							
							 
							
							... 
							
							
							
							llvm-svn: 22831 
							
						 
						
							2005-08-17 17:42:52 +00:00  
						
					 
				
					
						
							
							
								 
								Jim Laskey
							
						 
						
							 
							
							
							
							
								
							
							
								898ba557d0 
								
							 
						 
						
							
							
								
								Change hex float constants for the sake of VC++.  
							
							 
							
							... 
							
							
							
							llvm-svn: 22828 
							
						 
						
							2005-08-17 09:44:59 +00:00  
						
					 
				
					
						
							
							
								 
								Jim Laskey
							
						 
						
							 
							
							
							
							
								
							
							
								f2516a9180 
								
							 
						 
						
							
							
								
								Added generic code expansion for [signed|unsigned] i32 to [f32|f64] casts in the  
							
							 
							
							... 
							
							
							
							legalizer.  PowerPC now uses this expansion instead of ISel version.
Example:
// signed integer to double conversion
double f1(signed x) {
  return (double)x;
}
// unsigned integer to double conversion
double f2(unsigned x) {
  return (double)x;
}
// signed integer to float conversion
float f3(signed x) {
  return (float)x;
}
// unsigned integer to float conversion
float f4(unsigned x) {
  return (float)x;
}
Byte Code:
internal fastcc double %_Z2f1i(int %x) {
entry:
        %tmp.1 = cast int %x to double          ; <double> [#uses=1]
        ret double %tmp.1
}
internal fastcc double %_Z2f2j(uint %x) {
entry:
        %tmp.1 = cast uint %x to double         ; <double> [#uses=1]
        ret double %tmp.1
}
internal fastcc float %_Z2f3i(int %x) {
entry:
        %tmp.1 = cast int %x to float           ; <float> [#uses=1]
        ret float %tmp.1
}
internal fastcc float %_Z2f4j(uint %x) {
entry:
        %tmp.1 = cast uint %x to float          ; <float> [#uses=1]
        ret float %tmp.1
}
internal fastcc double %_Z2g1i(int %x) {
entry:
        %buffer = alloca [2 x uint]             ; <[2 x uint]*> [#uses=3]
        %tmp.0 = getelementptr [2 x uint]* %buffer, int 0, int 0                ; <uint*> [#uses=1]
        store uint 1127219200, uint* %tmp.0
        %tmp.2 = cast int %x to uint            ; <uint> [#uses=1]
        %tmp.3 = xor uint %tmp.2, 2147483648            ; <uint> [#uses=1]
        %tmp.5 = getelementptr [2 x uint]* %buffer, int 0, int 1                ; <uint*> [#uses=1]
        store uint %tmp.3, uint* %tmp.5
        %tmp.9 = cast [2 x uint]* %buffer to double*            ; <double*> [#uses=1]
        %tmp.10 = load double* %tmp.9           ; <double> [#uses=1]
        %tmp.13 = load double* cast (long* %signed_bias to double*)             ; <double> [#uses=1]
        %tmp.14 = sub double %tmp.10, %tmp.13           ; <double> [#uses=1]
        ret double %tmp.14
}
internal fastcc double %_Z2g2j(uint %x) {
entry:
        %buffer = alloca [2 x uint]             ; <[2 x uint]*> [#uses=3]
        %tmp.0 = getelementptr [2 x uint]* %buffer, int 0, int 0                ; <uint*> [#uses=1]
        store uint 1127219200, uint* %tmp.0
        %tmp.1 = getelementptr [2 x uint]* %buffer, int 0, int 1                ; <uint*> [#uses=1]
        store uint %x, uint* %tmp.1
        %tmp.4 = cast [2 x uint]* %buffer to double*            ; <double*> [#uses=1]
        %tmp.5 = load double* %tmp.4            ; <double> [#uses=1]
        %tmp.8 = load double* cast (long* %unsigned_bias to double*)            ; <double> [#uses=1]
        %tmp.9 = sub double %tmp.5, %tmp.8              ; <double> [#uses=1]
        ret double %tmp.9
}
internal fastcc float %_Z2g3i(int %x) {
entry:
        %buffer = alloca [2 x uint]             ; <[2 x uint]*> [#uses=3]
        %tmp.0 = getelementptr [2 x uint]* %buffer, int 0, int 0                ; <uint*> [#uses=1]
        store uint 1127219200, uint* %tmp.0
        %tmp.2 = cast int %x to uint            ; <uint> [#uses=1]
        %tmp.3 = xor uint %tmp.2, 2147483648            ; <uint> [#uses=1]
        %tmp.5 = getelementptr [2 x uint]* %buffer, int 0, int 1                ; <uint*> [#uses=1]
        store uint %tmp.3, uint* %tmp.5
        %tmp.9 = cast [2 x uint]* %buffer to double*            ; <double*> [#uses=1]
        %tmp.10 = load double* %tmp.9           ; <double> [#uses=1]
        %tmp.13 = load double* cast (long* %signed_bias to double*)             ; <double> [#uses=1]
        %tmp.14 = sub double %tmp.10, %tmp.13           ; <double> [#uses=1]
        %tmp.16 = cast double %tmp.14 to float          ; <float> [#uses=1]
        ret float %tmp.16
}
internal fastcc float %_Z2g4j(uint %x) {
entry:
        %buffer = alloca [2 x uint]             ; <[2 x uint]*> [#uses=3]
        %tmp.0 = getelementptr [2 x uint]* %buffer, int 0, int 0                ; <uint*> [#uses=1]
        store uint 1127219200, uint* %tmp.0
        %tmp.1 = getelementptr [2 x uint]* %buffer, int 0, int 1                ; <uint*> [#uses=1]
        store uint %x, uint* %tmp.1
        %tmp.4 = cast [2 x uint]* %buffer to double*            ; <double*> [#uses=1]
        %tmp.5 = load double* %tmp.4            ; <double> [#uses=1]
        %tmp.8 = load double* cast (long* %unsigned_bias to double*)            ; <double> [#uses=1]
        %tmp.9 = sub double %tmp.5, %tmp.8              ; <double> [#uses=1]
        %tmp.11 = cast double %tmp.9 to float           ; <float> [#uses=1]
        ret float %tmp.11
}
PowerPC Code:
        .machine ppc970
        .const
        .align  2
.CPIl1__Z2f1i_0:                                        ; float 0x4330000080000000
        .long   1501560836      ; float 4.5036e+15
        .text
        .align  2
        .globl  l1__Z2f1i
l1__Z2f1i:
.LBBl1__Z2f1i_0:        ; entry
        xoris r2, r3, 32768
        stw r2, -4(r1)
        lis r2, 17200
        stw r2, -8(r1)
        lfd f0, -8(r1)
        lis r2, ha16(.CPIl1__Z2f1i_0)
        lfs f1, lo16(.CPIl1__Z2f1i_0)(r2)
        fsub f1, f0, f1
        blr
        .const
        .align  2
.CPIl2__Z2f2j_0:                                        ; float 0x4330000000000000
        .long   1501560832      ; float 4.5036e+15
        .text
        .align  2
        .globl  l2__Z2f2j
l2__Z2f2j:
.LBBl2__Z2f2j_0:        ; entry
        stw r3, -4(r1)
        lis r2, 17200
        stw r2, -8(r1)
        lfd f0, -8(r1)
        lis r2, ha16(.CPIl2__Z2f2j_0)
        lfs f1, lo16(.CPIl2__Z2f2j_0)(r2)
        fsub f1, f0, f1
        blr
        .const
        .align  2
.CPIl3__Z2f3i_0:                                        ; float 0x4330000080000000
        .long   1501560836      ; float 4.5036e+15
        .text
        .align  2
        .globl  l3__Z2f3i
l3__Z2f3i:
.LBBl3__Z2f3i_0:        ; entry
        xoris r2, r3, 32768
        stw r2, -4(r1)
        lis r2, 17200
        stw r2, -8(r1)
        lfd f0, -8(r1)
        lis r2, ha16(.CPIl3__Z2f3i_0)
        lfs f1, lo16(.CPIl3__Z2f3i_0)(r2)
        fsub f0, f0, f1
        frsp f1, f0
        blr
        .const
        .align  2
.CPIl4__Z2f4j_0:                                        ; float 0x4330000000000000
        .long   1501560832      ; float 4.5036e+15
        .text
        .align  2
        .globl  l4__Z2f4j
l4__Z2f4j:
.LBBl4__Z2f4j_0:        ; entry
        stw r3, -4(r1)
        lis r2, 17200
        stw r2, -8(r1)
        lfd f0, -8(r1)
        lis r2, ha16(.CPIl4__Z2f4j_0)
        lfs f1, lo16(.CPIl4__Z2f4j_0)(r2)
        fsub f0, f0, f1
        frsp f1, f0
        blr
llvm-svn: 22814 
							
						 
						
							2005-08-17 00:39:29 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								33182325f5 
								
							 
						 
						
							
							
								
								Eliminate the RegSDNode class, which 3 nodes (CopyFromReg/CopyToReg/ImplicitDef)  
							
							 
							
							... 
							
							
							
							used to tack a register number onto the node.
Instead of doing this, make a new node, RegisterSDNode, which is a leaf
containing a register number.  These three operations just become normal
DAG nodes now, instead of requiring special handling.
Note that with this change, it is no longer correct to make illegal
CopyFromReg/CopyToReg nodes.  The legalizer will not touch them, and this
is bad, so don't do it. :)
llvm-svn: 22806 
							
						 
						
							2005-08-16 21:55:35 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								371e49515d 
								
							 
						 
						
							
							
								
								Implement BR_CC and BRTWOWAY_CC.  This allows the removal of a rather nasty  
							
							 
							
							... 
							
							
							
							fixme from the PowerPC backend.  Emit slightly better code for legalizing
select_cc.
llvm-svn: 22805 
							
						 
						
							2005-08-16 19:49:35 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								1973278b38 
								
							 
						 
						
							
							
								
								Add some methods for dag->dag isel.  
							
							 
							
							... 
							
							
							
							Split RemoveNodeFromCSEMaps out of DeleteNodesIfDead to do it.
llvm-svn: 22801 
							
						 
						
							2005-08-16 18:17:10 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								d5e739dcc2 
								
							 
						 
						
							
							
								
								Fix last night's PPC32 regressions by  
							
							 
							
							... 
							
							
							
							1. Not selecting the false value of a select_cc in the false arm, which
   isn't legal for nested selects.
2. Actually returning the node we created and Legalized in the FP_TO_UINT
   Expander.
llvm-svn: 22789 
							
						 
						
							2005-08-14 18:38:32 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								36853ee1fd 
								
							 
						 
						
							
							
								
								Teach the legalizer how to legalize FP_TO_UINT.  
							
							 
							
							... 
							
							
							
							Teach the legalizer to promote FP_TO_UINT to FP_TO_SINT if the wider
  FP_TO_UINT is also illegal.  This allows us on PPC to codegen
  unsigned short foo(float a) { return a; }
as:
_foo:
.LBB_foo_0:     ; entry
        fctiwz f0, f1
        stfd f0, -8(r1)
        lwz r2, -4(r1)
        rlwinm r3, r2, 0, 16, 31
        blr
instead of:
_foo:
.LBB_foo_0:     ; entry
        fctiwz f0, f1
        stfd f0, -8(r1)
        lwz r2, -4(r1)
        lis r3, ha16(.CPI_foo_0)
        lfs f0, lo16(.CPI_foo_0)(r3)
        fcmpu cr0, f1, f0
        blt .LBB_foo_2  ; entry
.LBB_foo_1:     ; entry
        fsubs f0, f1, f0
        fctiwz f0, f0
        stfd f0, -16(r1)
        lwz r2, -12(r1)
        xoris r2, r2, 32768
.LBB_foo_2:     ; entry
        rlwinm r3, r2, 0, 16, 31
        blr
llvm-svn: 22785 
							
						 
						
							2005-08-14 01:20:53 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								180b08897f 
								
							 
						 
						
							
							
								
								Some SELECT_CC cleanups:  
							
							 
							
							... 
							
							
							
							1. move assertions for node creation to getNode()
2. legalize the values returned in ExpandOp immediately
3. Move select_cc optimizations from SELECT's getNode() to SELECT_CC's,
   allowing them to be cleaned up significantly.
This paves the way to pick up additional optimizations on SELECT_CC, such
as sum-of-absolute-differences.
llvm-svn: 22757 
							
						 
						
							2005-08-11 01:12:20 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								e5b86d7442 
								
							 
						 
						
							
							
								
								Add new node, SELECT_CC.  This node is for targets that don't natively  
							
							 
							
							... 
							
							
							
							implement SELECT.
llvm-svn: 22755 
							
						 
						
							2005-08-10 20:51:12 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								d47675ed24 
								
							 
						 
						
							
							
								
								Eliminate the SetCCSDNode in favor of a CondCodeSDNode class.  This pulls the  
							
							 
							
							... 
							
							
							
							CC out of the SetCC operation, making SETCC a standard ternary operation and
CC's a standard DAG leaf.  This will make it possible for other node to use
CC's as operands in the future...
llvm-svn: 22728 
							
						 
						
							2005-08-09 20:20:18 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								96ad31321a 
								
							 
						 
						
							
							
								
								Change FindEarliestCallSeqEnd (used by libcall insertion) to use a set to  
							
							 
							
							... 
							
							
							
							avoid revisiting nodes more than once.  This eliminates a source of
potentially exponential behavior.  For a small function in 191.fma3d
(hexah_stress_divergence_), this speeds up isel from taking > 20mins to
taking 0.07s.
llvm-svn: 22680 
							
						 
						
							2005-08-05 18:10:27 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								cabdc34563 
								
							 
						 
						
							
							
								
								Fix a latent bug in the libcall inserter that was exposed by Nate's patch  
							
							 
							
							... 
							
							
							
							yesterday.  This fixes whetstone and a bunch of programs in the External tests.
llvm-svn: 22678 
							
						 
						
							2005-08-05 16:23:57 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								77558da546 
								
							 
						 
						
							
							
								
								Fix a fixme in LegalizeDAG  
							
							 
							
							... 
							
							
							
							llvm-svn: 22661 
							
						 
						
							2005-08-04 21:43:28 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								8191442548 
								
							 
						 
						
							
							
								
								Fix PR611, codegen'ing SREM of FP operands to fmod or fmodf instead of  
							
							 
							
							... 
							
							
							
							the sequence used for integer ops
llvm-svn: 22629 
							
						 
						
							2005-08-03 20:31:37 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								4398daf069 
								
							 
						 
						
							
							
								
								Fix casts from long to sbyte on ppc  
							
							 
							
							... 
							
							
							
							llvm-svn: 22570 
							
						 
						
							2005-08-01 18:16:37 +00:00  
						
					 
				
					
						
							
							
								 
								Jeff Cohen
							
						 
						
							 
							
							
							
							
								
							
							
								546fd5944e 
								
							 
						 
						
							
							
								
								Keep tabs and trailing spaces out.  
							
							 
							
							... 
							
							
							
							llvm-svn: 22565 
							
						 
						
							2005-07-30 18:33:25 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								941d84a34d 
								
							 
						 
						
							
							
								
								fix float->long conversions on x86  
							
							 
							
							... 
							
							
							
							llvm-svn: 22563 
							
						 
						
							2005-07-30 01:40:57 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f59b2daddb 
								
							 
						 
						
							
							
								
								Allow targets to have custom expanders for FP_TO_*INT conversions where  
							
							 
							
							... 
							
							
							
							both the src and dest values are legal
llvm-svn: 22555 
							
						 
						
							2005-07-30 00:04:12 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								fe68d75aad 
								
							 
						 
						
							
							
								
								Allow targets to define custom expanders for FP_TO_*INT  
							
							 
							
							... 
							
							
							
							llvm-svn: 22548 
							
						 
						
							2005-07-29 00:33:32 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								44fe26ff07 
								
							 
						 
						
							
							
								
								allow a target to request that unknown FP_TO_*INT conversion be promoted to  
							
							 
							
							... 
							
							
							
							a larger integer destination.
llvm-svn: 22547 
							
						 
						
							2005-07-29 00:11:56 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f99f8f9081 
								
							 
						 
						
							
							
								
								instead of having all conversions be handled by one case value, and then have  
							
							 
							
							... 
							
							
							
							subcases inside, break things out earlier.
llvm-svn: 22546 
							
						 
						
							2005-07-28 23:31:12 +00:00  
						
					 
				
					
						
							
							
								 
								Jeff Cohen
							
						 
						
							 
							
							
							
							
								
							
							
								5f4ef3c5a8 
								
							 
						 
						
							
							
								
								Eliminate all remaining tabs and trailing spaces.  
							
							 
							
							... 
							
							
							
							llvm-svn: 22523 
							
						 
						
							2005-07-27 06:12:32 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								b35912e421 
								
							 
						 
						
							
							
								
								The assertion was wrong: the code only worked for i64.  While we're at it,  
							
							 
							
							... 
							
							
							
							expand the code to work for all integer datatypes.  This should unbreak
alpha.
llvm-svn: 22464 
							
						 
						
							2005-07-18 04:31:14 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								7e74c834c1 
								
							 
						 
						
							
							
								
								Teach the legalizer how to promote SINT_TO_FP to a wider SINT_TO_FP that  
							
							 
							
							... 
							
							
							
							the target natively supports.  This eliminates some special-case code from
the x86 backend and generates better code as well.
For an i8 to f64 conversion, before & after:
_x87 before:
        subl $2, %esp
        movb 6(%esp), %al
        movsbw %al, %ax
        movw %ax, (%esp)
        filds (%esp)
        addl $2, %esp
        ret
_x87 after:
        subl $2, %esp
        movsbw 6(%esp), %ax
        movw %ax, (%esp)
        filds (%esp)
        addl $2, %esp
        ret
_sse before:
        subl $12, %esp
        movb 16(%esp), %al
        movsbl %al, %eax
        cvtsi2sd %eax, %xmm0
        addl $12, %esp
        ret
_sse after:
        subl $12, %esp
        movsbl 16(%esp), %eax
        cvtsi2sd %eax, %xmm0
        addl $12, %esp
        ret
llvm-svn: 22452 
							
						 
						
							2005-07-16 02:02:34 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								e3e847bfd7 
								
							 
						 
						
							
							
								
								Break the code for expanding UINT_TO_FP operations out into its own  
							
							 
							
							... 
							
							
							
							SelectionDAGLegalize::ExpandLegalUINT_TO_FP method.
Add a new method, PromoteLegalUINT_TO_FP, which allows targets to request
that UINT_TO_FP operations be promoted to a larger input type.  This is
useful for targets that have some UINT_TO_FP or SINT_TO_FP operations but
not all of them (like X86).
The same should be done with SINT_TO_FP, but this patch does not do that
yet.
llvm-svn: 22447 
							
						 
						
							2005-07-16 00:19:57 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f9ddfef872 
								
							 
						 
						
							
							
								
								Fix Alpha/2005-07-12-TwoMallocCalls.ll and PR593.  
							
							 
							
							... 
							
							
							
							It is not safe to call LegalizeOp on something that has already been legalized.
Instead, just force another iteration of legalization.
This could affect all platforms but X86, as this codepath is dynamically
dead on X86 (ISD::MEMSET and friends are legal).
llvm-svn: 22419 
							
						 
						
							2005-07-13 02:00:04 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ba08a336f0 
								
							 
						 
						
							
							
								
								Fix test/Regression/CodeGen/Generic/2005-07-12-memcpy-i64-length.ll  
							
							 
							
							... 
							
							
							
							llvm-svn: 22417 
							
						 
						
							2005-07-13 01:42:45 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								de0a4b1987 
								
							 
						 
						
							
							
								
								Change *EXTLOAD to use an VTSDNode operand instead of being an MVTSDNode.  
							
							 
							
							... 
							
							
							
							This is the last MVTSDNode.
This allows us to eliminate a bunch of special case code for handling
MVTSDNodes.
llvm-svn: 22367 
							
						 
						
							2005-07-10 01:55:33 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								36db1ed06f 
								
							 
						 
						
							
							
								
								Change TRUNCSTORE to use a VTSDNode operand instead of being an MVTSTDNode  
							
							 
							
							... 
							
							
							
							llvm-svn: 22366 
							
						 
						
							2005-07-10 00:29:18 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								0b6ba90a72 
								
							 
						 
						
							
							
								
								Introduce a new VTSDNode class with the ultimate goal of eliminating the  
							
							 
							
							... 
							
							
							
							MVTSDNode class.  This class is used to provide an operand to operators
that require an extra type.  We start by converting FP_ROUND_INREG and
SIGN_EXTEND_INREG over to using it.
llvm-svn: 22364 
							
						 
						
							2005-07-10 00:07:11 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								80fe411662 
								
							 
						 
						
							
							
								
								2 fixes:  
							
							 
							
							... 
							
							
							
							1: Legalize operand in UINT_TO_FP expanision
2: SRA x, const i8 was not promoting the constant to shift amount type.
llvm-svn: 22337 
							
						 
						
							2005-07-05 19:52:39 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								be3a74ca3e 
								
							 
						 
						
							
							
								
								I really didn't think this was necessary.  But, Legalize wasn't running again  
							
							 
							
							... 
							
							
							
							and legalizing the extload.  Strange.  Should fix most alpha regressions.
llvm-svn: 22329 
							
						 
						
							2005-07-02 20:58:53 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								0a370f4de5 
								
							 
						 
						
							
							
								
								oops  
							
							 
							
							... 
							
							
							
							llvm-svn: 22320 
							
						 
						
							2005-06-30 19:32:57 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								b5597e38f6 
								
							 
						 
						
							
							
								
								FP EXTLOAD is not support on all archs, expand to LOAD and FP_EXTEND  
							
							 
							
							... 
							
							
							
							llvm-svn: 22319 
							
						 
						
							2005-06-30 19:22:37 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								d74877a46d 
								
							 
						 
						
							
							
								
								Adapt the code for handling uint -> fp conversion for the 32 bit case to  
							
							 
							
							... 
							
							
							
							handling it in the 64 bit case.  The two code paths should probably be merged.
llvm-svn: 22302 
							
						 
						
							2005-06-27 23:28:32 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								3268f244e6 
								
							 
						 
						
							
							
								
								allow token chain at start or end of node  
							
							 
							
							... 
							
							
							
							llvm-svn: 22020 
							
						 
						
							2005-05-14 08:34:53 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								865359958b 
								
							 
						 
						
							
							
								
								remove special case hacks for readport/readio from the binary operator  
							
							 
							
							... 
							
							
							
							codepath
llvm-svn: 22019 
							
						 
						
							2005-05-14 07:45:46 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								96c262e24b 
								
							 
						 
						
							
							
								
								Eliminate special purpose hacks for dynamic_stack_alloc.  
							
							 
							
							... 
							
							
							
							llvm-svn: 22015 
							
						 
						
							2005-05-14 07:29:57 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								669e8c2c9c 
								
							 
						 
						
							
							
								
								Use the general mechanism for creating multi-value nodes instead of using  
							
							 
							
							... 
							
							
							
							special case hacks.
llvm-svn: 22014 
							
						 
						
							2005-05-14 07:25:05 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								3eb8693279 
								
							 
						 
						
							
							
								
								legalize target-specific operations  
							
							 
							
							... 
							
							
							
							llvm-svn: 22010 
							
						 
						
							2005-05-14 06:34:48 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								29dcc71d83 
								
							 
						 
						
							
							
								
								LowerOperation takes a dag  
							
							 
							
							... 
							
							
							
							llvm-svn: 22004 
							
						 
						
							2005-05-14 05:50:48 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								d3cc996a47 
								
							 
						 
						
							
							
								
								Allow targets to have a custom int64->fp expander if desired  
							
							 
							
							... 
							
							
							
							llvm-svn: 22001 
							
						 
						
							2005-05-14 05:33:54 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2e77db6af6 
								
							 
						 
						
							
							
								
								Add an isTailCall flag to LowerCallTo  
							
							 
							
							... 
							
							
							
							llvm-svn: 21958 
							
						 
						
							2005-05-13 18:50:42 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								d0feb64443 
								
							 
						 
						
							
							
								
								Handle TAILCALL node  
							
							 
							
							... 
							
							
							
							llvm-svn: 21957 
							
						 
						
							2005-05-13 18:43:43 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								bb1d60de9c 
								
							 
						 
						
							
							
								
								Fix a problem that nate reduced for me.  
							
							 
							
							... 
							
							
							
							llvm-svn: 21923 
							
						 
						
							2005-05-13 05:17:00 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5a14c8a18e 
								
							 
						 
						
							
							
								
								rename variables and functions to match renamed DAG nodes.  Bonus feature:  
							
							 
							
							... 
							
							
							
							I can actually remember which one is which now!
llvm-svn: 21922 
							
						 
						
							2005-05-13 05:09:11 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2a4f7312cd 
								
							 
						 
						
							
							
								
								do not call expandop on the same value more than once.  This fixes  
							
							 
							
							... 
							
							
							
							X86/2004-02-22-Casts.llx
llvm-svn: 21919 
							
						 
						
							2005-05-13 04:45:13 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								d34cd28aa7 
								
							 
						 
						
							
							
								
								update comment  
							
							 
							
							... 
							
							
							
							llvm-svn: 21916 
							
						 
						
							2005-05-12 23:24:44 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2dce703710 
								
							 
						 
						
							
							
								
								rename the ADJCALLSTACKDOWN/ADJCALLSTACKUP nodes to be CALLSEQ_START/BEGIN.  
							
							 
							
							... 
							
							
							
							llvm-svn: 21915 
							
						 
						
							2005-05-12 23:24:06 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								111778e665 
								
							 
						 
						
							
							
								
								Pass calling convention to use into lower call to  
							
							 
							
							... 
							
							
							
							llvm-svn: 21900 
							
						 
						
							2005-05-12 19:56:57 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								0bfd177e89 
								
							 
						 
						
							
							
								
								fix expansion of ct[lt]z nodes  
							
							 
							
							... 
							
							
							
							llvm-svn: 21896 
							
						 
						
							2005-05-12 19:27:51 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								cf5f6b0ccb 
								
							 
						 
						
							
							
								
								Expand 64-bit ctlz/cttz nodes for 32-bit targets  
							
							 
							
							... 
							
							
							
							llvm-svn: 21895 
							
						 
						
							2005-05-12 19:05:01 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								26f0317f46 
								
							 
						 
						
							
							
								
								Fix uint->fp casts on PPC, allowing UnitTests/2005-05-12-Int64ToFP to  
							
							 
							
							... 
							
							
							
							work on it.
llvm-svn: 21894 
							
						 
						
							2005-05-12 18:52:34 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								b5a78e0873 
								
							 
						 
						
							
							
								
								Allow something to be legalized multiple times.  This can be used to reduce  
							
							 
							
							... 
							
							
							
							legalization iteration
llvm-svn: 21892 
							
						 
						
							2005-05-12 16:53:42 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								153587e555 
								
							 
						 
						
							
							
								
								Oops, don't do this after we figure out where to insert the call chains.  
							
							 
							
							... 
							
							
							
							llvm-svn: 21890 
							
						 
						
							2005-05-12 07:00:44 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								8a5ad8468a 
								
							 
						 
						
							
							
								
								Make sure to expand all nodes, avoiding unintentional node duplication.  
							
							 
							
							... 
							
							
							
							llvm-svn: 21889 
							
						 
						
							2005-05-12 06:54:21 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f09c0b435b 
								
							 
						 
						
							
							
								
								add fixme  
							
							 
							
							... 
							
							
							
							llvm-svn: 21887 
							
						 
						
							2005-05-12 06:04:14 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								a5bf1030bf 
								
							 
						 
						
							
							
								
								Fix a problem where early legalization can cause token chain problems.  
							
							 
							
							... 
							
							
							
							llvm-svn: 21885 
							
						 
						
							2005-05-12 04:49:08 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								8005e91432 
								
							 
						 
						
							
							
								
								Make legalize a bit more efficient, and canonicalize sub X, C -> add X, -C  
							
							 
							
							... 
							
							
							
							llvm-svn: 21882 
							
						 
						
							2005-05-12 00:17:04 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								99fa5bc1fa 
								
							 
						 
						
							
							
								
								Necessary changes to codegen cttz efficiently on PowerPC  
							
							 
							
							... 
							
							
							
							1. Teach LegalizeDAG how to better legalize CTTZ if the target doesn't have
   CTPOP, but does have CTLZ
2. Teach PPC32 how to do sub x, const -> add x, -const for valid consts
3. Teach PPC32 how to do and (xor a, -1) b -> andc b, a
4. Teach PPC32 that ISD::CTLZ -> PPC::CNTLZW
llvm-svn: 21880 
							
						 
						
							2005-05-11 23:43:56 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								06bbeb646f 
								
							 
						 
						
							
							
								
								Fix the last remaining bug preventing us from switching the X86 BE over  
							
							 
							
							... 
							
							
							
							from the simple isel to the pattern isel.  This forces inserted libcalls
to serialize against other function calls, which was breaking
UnitTests/2005-05-12-Int64ToFP.  Hopefully this will fix issues on other
targets as well.
llvm-svn: 21872 
							
						 
						
							2005-05-11 19:02:11 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								56add05671 
								
							 
						 
						
							
							
								
								Make sure to legalize generated ctpop nodes, convert tabs to spaces  
							
							 
							
							... 
							
							
							
							llvm-svn: 21868 
							
						 
						
							2005-05-11 18:35:21 +00:00  
						
					 
				
					
						
							
							
								 
								Duraid Madina
							
						 
						
							 
							
							
							
							
								
							
							
								a1ebbac9c0 
								
							 
						 
						
							
							
								
								expand count-leading/trailing-zeros; the test 2005-05-11-Popcount-ffs-fls.c  
							
							 
							
							... 
							
							
							
							should now pass (the "LLVM" and "REF" results should be identical)
llvm-svn: 21866 
							
						 
						
							2005-05-11 08:45:08 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								7247324047 
								
							 
						 
						
							
							
								
								Add some notes for expanding clz/ctz  
							
							 
							
							... 
							
							
							
							llvm-svn: 21862 
							
						 
						
							2005-05-11 05:27:09 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								05309bf58e 
								
							 
						 
						
							
							
								
								Simplify this code, use the proper shift amount  
							
							 
							
							... 
							
							
							
							llvm-svn: 21861 
							
						 
						
							2005-05-11 05:21:31 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								3740f39883 
								
							 
						 
						
							
							
								
								Legalize this correctly  
							
							 
							
							... 
							
							
							
							llvm-svn: 21859 
							
						 
						
							2005-05-11 05:09:47 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								55e9cde37c 
								
							 
						 
						
							
							
								
								implement expansion of ctpop nodes, implementing CodeGen/Generic/llvm-ct-intrinsics.ll  
							
							 
							
							... 
							
							
							
							llvm-svn: 21856 
							
						 
						
							2005-05-11 04:51:16 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ba45e6c432 
								
							 
						 
						
							
							
								
								legalize readio/writeio into a load/store if requested  
							
							 
							
							... 
							
							
							
							llvm-svn: 21827 
							
						 
						
							2005-05-09 20:36:57 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5385db5523 
								
							 
						 
						
							
							
								
								legalize READPORT, WRITEPORT, READIO, WRITEIO, at least in the basic cases  
							
							 
							
							... 
							
							
							
							where they are directly supported by the architecture.  Wrap a bunch of
long lines :(
llvm-svn: 21826 
							
						 
						
							2005-05-09 20:23:03 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								2dbbb3ab84 
								
							 
						 
						
							
							
								
								ctpop lowering in legalize  
							
							 
							
							... 
							
							
							
							llvm-svn: 21697 
							
						 
						
							2005-05-05 15:55:21 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								dd426dd04d 
								
							 
						 
						
							
							
								
								Make promoteOp work for CT*  
							
							 
							
							... 
							
							
							
							Proof?
ubyte %bar(ubyte %x) {
entry:
        %tmp.1 = call ubyte %llvm.ctlz( ubyte %x )
        ret ubyte %tmp.1
}
==>
zapnot $16,1,$0
CTLZ $0,$0
subq $0,56,$0
zapnot $0,1,$0
ret $31,($26),1
llvm-svn: 21691 
							
						 
						
							2005-05-04 19:11:05 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								5e177826fd 
								
							 
						 
						
							
							
								
								Implement count leading zeros (ctlz), count trailing zeros (cttz), and count  
							
							 
							
							... 
							
							
							
							population (ctpop).  Generic lowering is implemented, however only promotion
is implemented for SelectionDAG at the moment.
More coming soon.
llvm-svn: 21676 
							
						 
						
							2005-05-03 17:19:30 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								8002640eab 
								
							 
						 
						
							
							
								
								Codegen and legalize sin/cos/llvm.sqrt as FSIN/FCOS/FSQRT calls.  This patch  
							
							 
							
							... 
							
							
							
							was contributed by Morten Ofstad, with some minor tweaks and bug fixes added
by me.
llvm-svn: 21636 
							
						 
						
							2005-04-30 04:43:14 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								9d6fa98ec7 
								
							 
						 
						
							
							
								
								Legalize FSQRT, FSIN, FCOS nodes, patch contributed by Morten Ofstad  
							
							 
							
							... 
							
							
							
							llvm-svn: 21606 
							
						 
						
							2005-04-28 21:44:33 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								4a73c2cfdc 
								
							 
						 
						
							
							
								
								Implement Value* tracking for loads and stores in the selection DAG.  This enables one to use alias analysis in the backends.  
							
							 
							
							... 
							
							
							
							(TRUNK)Stores and (EXT|ZEXT|SEXT)Loads have an extra SDOperand which is a SrcValueSDNode which contains the Value*.  Note that if the operation is introduced by the backend, it will still have the operand, but the value* will be null.
llvm-svn: 21599 
							
						 
						
							2005-04-27 20:10:01 +00:00  
						
					 
				
					
						
							
							
								 
								Misha Brukman
							
						 
						
							 
							
							
							
							
								
							
							
								835702a094 
								
							 
						 
						
							
							
								
								Remove trailing whitespace  
							
							 
							
							... 
							
							
							
							llvm-svn: 21420 
							
						 
						
							2005-04-21 22:36:52 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								e69ad5fd12 
								
							 
						 
						
							
							
								
								Implement expansion of unsigned i64 -> FP.  
							
							 
							
							... 
							
							
							
							Note that this probably only works for little endian targets, but is enough
to get siod working :)
llvm-svn: 21280 
							
						 
						
							2005-04-13 05:09:42 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								0efd77eda7 
								
							 
						 
						
							
							
								
								Make expansion of uint->fp cast assert out instead of infinitely recurse.  
							
							 
							
							... 
							
							
							
							llvm-svn: 21275 
							
						 
						
							2005-04-13 03:42:14 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								0e852afb4c 
								
							 
						 
						
							
							
								
								Instead of making ZERO_EXTEND_INREG nodes, use the helper method in  
							
							 
							
							... 
							
							
							
							SelectionDAG to do the job with AND.  Don't legalize Z_E_I anymore as
it is gone
llvm-svn: 21266 
							
						 
						
							2005-04-13 02:38:47 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								0b73a6d8bc 
								
							 
						 
						
							
							
								
								promote extload i1 -> extload i8  
							
							 
							
							... 
							
							
							
							llvm-svn: 21258 
							
						 
						
							2005-04-12 20:30:10 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								aedcabe8db 
								
							 
						 
						
							
							
								
								Emit comparisons against the sign bit better.  Codegen this:  
							
							 
							
							... 
							
							
							
							bool %test1(long %X) {
        %A = setlt long %X, 0
        ret bool %A
}
like this:
test1:
        cmpl $0, 8(%esp)
        setl %al
        movzbl %al, %eax
        ret
instead of:
test1:
        movl 8(%esp), %ecx
        cmpl $0, %ecx
        setl %al
        movzbw %al, %ax
        cmpl $0, 4(%esp)
        setb %dl
        movzbw %dl, %dx
        cmpl $0, %ecx
        cmove %dx, %ax
        movzbl %al, %eax
        ret
llvm-svn: 21243 
							
						 
						
							2005-04-12 02:19:10 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								71ff44e46c 
								
							 
						 
						
							
							
								
								Emit long comparison against -1 better.  Instead of this (x86):  
							
							 
							
							... 
							
							
							
							test2:
        movl 8(%esp), %eax
        notl %eax
        movl 4(%esp), %ecx
        notl %ecx
        orl %eax, %ecx
        cmpl $0, %ecx
        sete %al
        movzbl %al, %eax
        ret
or this (PPC):
_test2:
        nor r2, r4, r4
        nor r3, r3, r3
        or r2, r2, r3
        cntlzw r2, r2
        srwi r3, r2, 5
        blr
Emit this:
test2:
        movl 8(%esp), %eax
        andl 4(%esp), %eax
        cmpl $-1, %eax
        sete %al
        movzbl %al, %eax
        ret
or this:
_test2:
.LBB_test2_0:   ;
        and r2, r4, r3
        cmpwi cr0, r2, -1
        li r3, 1
        li r2, 0
        beq .LBB_test2_2        ;
.LBB_test2_1:   ;
        or r3, r2, r2
.LBB_test2_2:   ;
        blr
it seems like the PPC isel could do better for R32 == -1 case.
llvm-svn: 21242 
							
						 
						
							2005-04-12 01:46:05 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								8ffd004920 
								
							 
						 
						
							
							
								
								Teach the dag mechanism that this:  
							
							 
							
							... 
							
							
							
							long long test2(unsigned A, unsigned B) {
        return ((unsigned long long)A << 32) + B;
}
is equivalent to this:
long long test1(unsigned A, unsigned B) {
        return ((unsigned long long)A << 32) | B;
}
Now they are both codegen'd to this on ppc:
_test2:
        blr
or this on x86:
test2:
        movl 4(%esp), %edx
        movl 8(%esp), %eax
        ret
llvm-svn: 21231 
							
						 
						
							2005-04-11 20:29:59 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								edd197062f 
								
							 
						 
						
							
							
								
								Fix expansion of shifts by exactly NVT bits on arch's (like X86) that have  
							
							 
							
							... 
							
							
							
							masking shifts.
This fixes the miscompilation of this:
long long test1(unsigned A, unsigned B) {
        return ((unsigned long long)A << 32) | B;
}
into this:
test1:
        movl 4(%esp), %edx
        movl %edx, %eax
        orl 8(%esp), %eax
        ret
allowing us to generate this instead:
test1:
        movl 4(%esp), %edx
        movl 8(%esp), %eax
        ret
llvm-svn: 21230 
							
						 
						
							2005-04-11 20:08:52 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								add0c63ad2 
								
							 
						 
						
							
							
								
								Fix libcall code to not pass a NULL Chain to LowerCallTo  
							
							 
							
							... 
							
							
							
							Fix libcall code to not crash or assert looking for an ADJCALLSTACKUP node
  when it is known that there is no ADJCALLSTACKDOWN to match.
Expand i64 multiply when ISD::MULHU is legal for the target.
llvm-svn: 21214 
							
						 
						
							2005-04-11 03:01:51 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								a3b7ef05f4 
								
							 
						 
						
							
							
								
								Teach legalize to deal with targets that don't support some SEXTLOAD/ZEXTLOADs  
							
							 
							
							... 
							
							
							
							llvm-svn: 21212 
							
						 
						
							2005-04-10 22:54:25 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								391a351ede 
								
							 
						 
						
							
							
								
								don't zextload fp values!  
							
							 
							
							... 
							
							
							
							llvm-svn: 21209 
							
						 
						
							2005-04-10 17:40:35 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c53cd501b5 
								
							 
						 
						
							
							
								
								Until we have a dag combiner, promote using zextload's instead of extloads.  
							
							 
							
							... 
							
							
							
							This gives the optimizer a bit of information about the top-part of the
value.
llvm-svn: 21205 
							
						 
						
							2005-04-10 04:33:47 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								d8cbfe82ba 
								
							 
						 
						
							
							
								
								Fix a thinko.  If the operand is promoted, pass the promoted value into  
							
							 
							
							... 
							
							
							
							the new zero extend, not the original operand.  This fixes cast bool -> long
on ppc.
Add an unrelated fixme
llvm-svn: 21196 
							
						 
						
							2005-04-10 01:13:15 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								fd98678a8a 
								
							 
						 
						
							
							
								
								Legalize BRCONDTWOWAY into a BRCOND/BR pair if a target doesn't support it.  
							
							 
							
							... 
							
							
							
							llvm-svn: 21166 
							
						 
						
							2005-04-09 03:30:19 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								b067492535 
								
							 
						 
						
							
							
								
								Teach ExpandShift how to handle shifts by a constant.  This allows targets  
							
							 
							
							... 
							
							
							
							like PowerPC to codegen long shifts in many fewer instructions.
llvm-svn: 21122 
							
						 
						
							2005-04-06 21:13:14 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								20b7d2a36f 
								
							 
						 
						
							
							
								
								Expand SREM and UREM for targets that claim not to have them, like PowerPC  
							
							 
							
							... 
							
							
							
							llvm-svn: 21103 
							
						 
						
							2005-04-06 00:23:54 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								cc00a7c42d 
								
							 
						 
						
							
							
								
								Handle expanding arguments to ISD::TRUNCATE.  This happens on PowerPC when  
							
							 
							
							... 
							
							
							
							you have something like i16 = truncate i64.  This fixes Regression/C/casts
llvm-svn: 21073 
							
						 
						
							2005-04-04 00:57:08 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								4784489de2 
								
							 
						 
						
							
							
								
								Fix sign_extend and zero_extend of promoted value types to expanded value  
							
							 
							
							... 
							
							
							
							types.  This occurs when casting short to long on PPC for example.
llvm-svn: 21072 
							
						 
						
							2005-04-03 23:41:52 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								a0c72cf289 
								
							 
						 
						
							
							
								
								Expand fabs into fneg  
							
							 
							
							... 
							
							
							
							llvm-svn: 21013 
							
						 
						
							2005-04-02 05:26:37 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								13fe99c807 
								
							 
						 
						
							
							
								
								Several changes mixed up here.  First when legalizing a DAG with pcmarker,  
							
							 
							
							... 
							
							
							
							dont' regen the whole dag if unneccesary.  Second, fix and ugly bug with
the _PARTS nodes that caused legalize to produce multiples of them.
Finally, implement initial support for FABS and FNEG.  Currently FNEG is
the only one to be trusted though.
llvm-svn: 21009 
							
						 
						
							2005-04-02 05:00:07 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								4157c417a1 
								
							 
						 
						
							
							
								
								fix some bugs in the implementation of SHL_PARTS and friends.  
							
							 
							
							... 
							
							
							
							llvm-svn: 21004 
							
						 
						
							2005-04-02 04:00:59 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2e5872c671 
								
							 
						 
						
							
							
								
								Turn expanded shift operations into (e.g.) SHL_PARTS if the target supports it.  
							
							 
							
							... 
							
							
							
							llvm-svn: 21002 
							
						 
						
							2005-04-02 03:38:53 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								07f97d5f55 
								
							 
						 
						
							
							
								
								Fix a bug when inserting a libcall into a function with no other calls.  
							
							 
							
							... 
							
							
							
							llvm-svn: 20999 
							
						 
						
							2005-04-02 03:22:40 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								69d39433c4 
								
							 
						 
						
							
							
								
								Fix a warning about an unhandled switch case  
							
							 
							
							... 
							
							
							
							llvm-svn: 20994 
							
						 
						
							2005-04-02 00:41:14 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								cda9aa7fa9 
								
							 
						 
						
							
							
								
								Add ISD::UNDEF node  
							
							 
							
							... 
							
							
							
							Teach the SelectionDAG code how to expand and promote it
Have PPC32 LowerCallTo generate ISD::UNDEF for int arg regs used up by fp
  arguments, but not shadowing their value.  This allows us to do the right
  thing with both fixed and vararg floating point arguments.
llvm-svn: 20988 
							
						 
						
							2005-04-01 22:34:39 +00:00  
						
					 
				
					
						
							
							
								 
								Andrew Lenharth
							
						 
						
							 
							
							
							
							
								
							
							
								dec53920b4 
								
							 
						 
						
							
							
								
								PCMarker support for DAG and Alpha  
							
							 
							
							... 
							
							
							
							llvm-svn: 20965 
							
						 
						
							2005-03-31 21:24:06 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								32e08b7c06 
								
							 
						 
						
							
							
								
								implement legalization of build_pair for nate  
							
							 
							
							... 
							
							
							
							llvm-svn: 20901 
							
						 
						
							2005-03-28 22:03:13 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								f656525cb6 
								
							 
						 
						
							
							
								
								Change interface to LowerCallTo to take a boolean isVarArg argument.  
							
							 
							
							... 
							
							
							
							llvm-svn: 20842 
							
						 
						
							2005-03-26 01:29:23 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								a474313902 
								
							 
						 
						
							
							
								
								Fix a bug in the 'store fpimm, ptr' -> 'store intimm, ptr' handling code.  
							
							 
							
							... 
							
							
							
							Changing 'op' here caused us to not enter the store into a map, causing
reemission of the code!!  In practice, a simple loop like this:
no_exit:                ; preds = %no_exit, %entry
        %indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry ]            ; <uint> [#uses=3]
        %tmp.4 = getelementptr "complex long double"* %P, uint %indvar, uint 0          ; <double*> [#uses=1]
        store double 0.000000e+00, double* %tmp.4
        %indvar.next = add uint %indvar, 1              ; <uint> [#uses=2]
        %exitcond = seteq uint %indvar.next, %N         ; <bool> [#uses=1]
        br bool %exitcond, label %return, label %no_exit
was being code gen'd to:
.LBBtest_1:     # no_exit
        movl %edx, %esi
        shll $4, %esi
        movl $0, 4(%eax,%esi)
        movl $0, (%eax,%esi)
        incl %edx
        movl $0, (%eax,%esi)
        movl $0, 4(%eax,%esi)
        cmpl %ecx, %edx
        jne .LBBtest_1  # no_exit
Note that we are doing 4 32-bit stores instead of 2.  Now we generate:
.LBBtest_1:     # no_exit
        movl %edx, %esi
        incl %esi
        shll $4, %edx
        movl $0, (%eax,%edx)
        movl $0, 4(%eax,%edx)
        cmpl %ecx, %esi
        movl %esi, %edx
        jne .LBBtest_1  # no_exit
This is much happier, though it would be even better if the increment of ESI
was scheduled after the compare :-/
llvm-svn: 20265 
							
						 
						
							2005-02-22 07:23:39 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								0559691163 
								
							 
						 
						
							
							
								
								Fix a case where were incorrectly compiled cast from short to int on 64-bit  
							
							 
							
							... 
							
							
							
							targets.
llvm-svn: 20030 
							
						 
						
							2005-02-04 18:39:19 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5aa75e4ce5 
								
							 
						 
						
							
							
								
								Fix yet another memset issue.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19986 
							
						 
						
							2005-02-02 03:44:41 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								4487b2e5a6 
								
							 
						 
						
							
							
								
								Fix some bugs andrew noticed legalizing memset for alpha  
							
							 
							
							... 
							
							
							
							llvm-svn: 19969 
							
						 
						
							2005-02-01 18:38:28 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								bc7497d5f5 
								
							 
						 
						
							
							
								
								Alpha doesn't have a native f32 extload instruction.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19880 
							
						 
						
							2005-01-28 22:58:25 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								bf8c1ad313 
								
							 
						 
						
							
							
								
								implement legalization of truncates whose results and sources need to be  
							
							 
							
							... 
							
							
							
							truncated, e.g. (truncate:i8 something:i16) on a 32 or 64-bit RISC.
llvm-svn: 19879 
							
						 
						
							2005-01-28 22:52:50 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								a4cfafe31a 
								
							 
						 
						
							
							
								
								Get alpha working with memset/memcpy/memmove  
							
							 
							
							... 
							
							
							
							llvm-svn: 19878 
							
						 
						
							2005-01-28 22:29:18 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								eb6614d719 
								
							 
						 
						
							
							
								
								CopyFromReg produces two values.  Make sure that we remember that both are  
							
							 
							
							... 
							
							
							
							legalized, and actually return the correct result when we legalize the chain first.
llvm-svn: 19866 
							
						 
						
							2005-01-28 06:27:38 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								0dfd7d3a0d 
								
							 
						 
						
							
							
								
								Silence optimized warnings.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19797 
							
						 
						
							2005-01-23 23:19:44 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								4add7e356f 
								
							 
						 
						
							
							
								
								Adjust to changes in SelectionDAG interfaces  
							
							 
							
							... 
							
							
							
							The first half of correct chain insertion for libcalls. This is not enough
to fix Fhourstones yet though.
llvm-svn: 19781 
							
						 
						
							2005-01-23 04:42:50 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ec2183713c 
								
							 
						 
						
							
							
								
								Fix problems with non-x86 targets.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19738 
							
						 
						
							2005-01-22 00:31:52 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								aac464e6c0 
								
							 
						 
						
							
							
								
								Refactor libcall code a bit.  Initial implementation of expanding int -> FP  
							
							 
							
							... 
							
							
							
							operations for 64-bit integers.
llvm-svn: 19724 
							
						 
						
							2005-01-21 06:05:23 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								4d25c04f94 
								
							 
						 
						
							
							
								
								Simplify the shift-expansion code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19721 
							
						 
						
							2005-01-20 20:29:23 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								b3f83b28a5 
								
							 
						 
						
							
							
								
								Expand add/sub into ADD_PARTS/SUB_PARTS instead of a non-existant libcall.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19715 
							
						 
						
							2005-01-20 18:52:28 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								3d95c14d94 
								
							 
						 
						
							
							
								
								Add support for targets that pass args in registers to calls.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19703 
							
						 
						
							2005-01-19 20:24:35 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								55562fa99a 
								
							 
						 
						
							
							
								
								Fold single use token factor nodes into other token factor nodes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19701 
							
						 
						
							2005-01-19 19:10:54 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								0d03eb45a8 
								
							 
						 
						
							
							
								
								Realize the individual pieces of an expanded copytoreg/store/load are  
							
							 
							
							... 
							
							
							
							independent of each other.
llvm-svn: 19700 
							
						 
						
							2005-01-19 18:02:17 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2a7f8a94f4 
								
							 
						 
						
							
							
								
								Implement a way of expanding shifts.  This applies to targets that offer  
							
							 
							
							... 
							
							
							
							select operations or to shifts that are by a constant.  This automatically
implements (with no special code) all of the special cases for shift by 32,
shift by < 32 and shift by > 32.
llvm-svn: 19679 
							
						 
						
							2005-01-19 04:19:40 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								42993e45b6 
								
							 
						 
						
							
							
								
								Zero is cheaper than sign extend.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19675 
							
						 
						
							2005-01-18 21:57:59 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								d65c3f3118 
								
							 
						 
						
							
							
								
								Fix some fixmes (promoting bools for select and brcond), fix promotion  
							
							 
							
							... 
							
							
							
							of zero and sign extends.
llvm-svn: 19671 
							
						 
						
							2005-01-18 19:27:06 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								9f2c4a5200 
								
							 
						 
						
							
							
								
								Teach legalize to promote copy(from|to)reg, instead of making the isel pass  
							
							 
							
							... 
							
							
							
							do it.  This results in better code on X86 for floats (because if strict
precision is not required, we can elide some more expensive double -> float
conversions like the old isel did), and allows other targets to emit
CopyFromRegs that are not legal for arguments.
llvm-svn: 19668 
							
						 
						
							2005-01-18 17:54:55 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2cb338d7b5 
								
							 
						 
						
							
							
								
								Teach legalize to promote SetCC results.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19657 
							
						 
						
							2005-01-18 02:59:52 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								b07e2d2084 
								
							 
						 
						
							
							
								
								Allow setcc operations to have nonbool types.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19656 
							
						 
						
							2005-01-18 02:52:03 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5c8a85e2d8 
								
							 
						 
						
							
							
								
								Implement legalize of call nodes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19617 
							
						 
						
							2005-01-16 19:46:48 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								3c0dd46a3b 
								
							 
						 
						
							
							
								
								Revamp supported ops.  Instead of just being supported or not, we now keep  
							
							 
							
							... 
							
							
							
							track of how to deal with it, and provide the target with a hook that they
can use to legalize arbitrary operations in arbitrary ways.
Implement custom lowering for a couple of ops, implement promotion for select
operations (which x86 needs).
llvm-svn: 19613 
							
						 
						
							2005-01-16 07:29:19 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								3ba56b3fe7 
								
							 
						 
						
							
							
								
								Implement some more missing promotions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19606 
							
						 
						
							2005-01-16 05:06:12 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								73b6977700 
								
							 
						 
						
							
							
								
								Clarify assertion.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19597 
							
						 
						
							2005-01-16 02:23:34 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								87a769cbd4 
								
							 
						 
						
							
							
								
								Move some information into the TargetLowering object.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19583 
							
						 
						
							2005-01-16 01:11:45 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								71d7f6e86f 
								
							 
						 
						
							
							
								
								legalize a bunch of operations that I missed.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19580 
							
						 
						
							2005-01-16 00:38:00 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								207a962c2c 
								
							 
						 
						
							
							
								
								Fix some serious bugs in promotion.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19578 
							
						 
						
							2005-01-16 00:17:42 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								4d97864e92 
								
							 
						 
						
							
							
								
								Implement promotion of a whole bunch more operators.  I think that this is  
							
							 
							
							... 
							
							
							
							basically everything.
llvm-svn: 19576 
							
						 
						
							2005-01-15 22:16:26 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								99222f706c 
								
							 
						 
						
							
							
								
								Add support for legalizing FP_ROUND_INREG, SIGN_EXTEND_INREG, and  
							
							 
							
							... 
							
							
							
							ZERO_EXTEND_INREG for targets that don't support them.
llvm-svn: 19573 
							
						 
						
							2005-01-15 07:15:18 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c6c9a5b07d 
								
							 
						 
						
							
							
								
								Add support for promoting ADD/MUL.  
							
							 
							
							... 
							
							
							
							Add support for new SIGN_EXTEND_INREG, ZERO_EXTEND_INREG, and FP_ROUND_INREG operators.
Realize that if we do any promotions, we need to iterate SelectionDAG
construction.
llvm-svn: 19569 
							
						 
						
							2005-01-15 06:18:18 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								1f2c9d82fa 
								
							 
						 
						
							
							
								
								Add intitial support for promoting some operators.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19565 
							
						 
						
							2005-01-15 05:21:40 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								3b8e719d1d 
								
							 
						 
						
							
							
								
								Adjust to CopyFromReg changes, implement deletion of truncating/extending  
							
							 
							
							... 
							
							
							
							stores/loads.
llvm-svn: 19562 
							
						 
						
							2005-01-14 22:38:01 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								39c6744c9f 
								
							 
						 
						
							
							
								
								Start implementing truncating stores and extending loads.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19559 
							
						 
						
							2005-01-14 22:08:15 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								e727af06c8 
								
							 
						 
						
							
							
								
								Add new ImplicitDef node, rename CopyRegSDNode class to RegSDNode.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19535 
							
						 
						
							2005-01-13 20:50:02 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								05b4e37e85 
								
							 
						 
						
							
							
								
								Legalize new node, add assertion.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19527 
							
						 
						
							2005-01-13 17:59:25 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								9864b08f94 
								
							 
						 
						
							
							
								
								Fix sign extend to long.  When coming from sbyte, we used to generate:  
							
							 
							
							... 
							
							
							
							movsbl 4(%esp), %eax
        movl %eax, %edx
        sarl $7, %edx
Now we generate:
        movsbl 4(%esp), %eax
        movl %eax, %edx
        sarl $31, %edx
Which is right.
llvm-svn: 19515 
							
						 
						
							2005-01-12 18:19:52 +00:00  
						
					 
				
					
						
							
							
								 
								Reid Spencer
							
						 
						
							 
							
							
							
							
								
							
							
								6dced92447 
								
							 
						 
						
							
							
								
								Shut up warnings with GCC 3.4.3 about uninitialized variables.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19512 
							
						 
						
							2005-01-12 14:53:45 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f49c27c65c 
								
							 
						 
						
							
							
								
								Squelch optimized warning.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19475 
							
						 
						
							2005-01-11 17:46:49 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								85d70c6fd5 
								
							 
						 
						
							
							
								
								Teach legalize to lower MEMSET/MEMCPY/MEMMOVE operations if the target  
							
							 
							
							... 
							
							
							
							does not support them.
llvm-svn: 19465 
							
						 
						
							2005-01-11 05:57:22 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								be02d430a9 
								
							 
						 
						
							
							
								
								Lower to the correct functions.  This fixes FreeBench/fourinarow  
							
							 
							
							... 
							
							
							
							llvm-svn: 19436 
							
						 
						
							2005-01-10 21:02:37 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								9242c504da 
								
							 
						 
						
							
							
								
								Fix a bug legalizing call instructions (make sure to remember all result  
							
							 
							
							... 
							
							
							
							values), and eliminate some switch statements.
llvm-svn: 19417 
							
						 
						
							2005-01-09 19:43:23 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								02f5ce2077 
								
							 
						 
						
							
							
								
								Fix a minor bug legalizing dynamic_stackalloc.  This allows us to compile  
							
							 
							
							... 
							
							
							
							std::__pad<wchar_t, std::char_traits<wchar_t> >::_S_pad(std::ios_base&, wchar_t, wchar_t*, wchar_t const*, int, int, bool)
from libstdc++
llvm-svn: 19416 
							
						 
						
							2005-01-09 19:07:54 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ec26b48d61 
								
							 
						 
						
							
							
								
								Teach legalize to deal with DYNAMIC_STACKALLOC (aka a dynamic llvm alloca)  
							
							 
							
							... 
							
							
							
							llvm-svn: 19415 
							
						 
						
							2005-01-09 19:03:49 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c0f31c5e96 
								
							 
						 
						
							
							
								
								Tighten up assertions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19397 
							
						 
						
							2005-01-08 20:35:13 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								d006195517 
								
							 
						 
						
							
							
								
								Silence VS warnings.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19384 
							
						 
						
							2005-01-08 19:52:31 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								7e6eeba6c5 
								
							 
						 
						
							
							
								
								Implement handling of most long operators through libcalls.  
							
							 
							
							... 
							
							
							
							Fix a bug legalizing "ret (Val,Val)"
llvm-svn: 19375 
							
						 
						
							2005-01-08 19:27:05 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2a6db3c351 
								
							 
						 
						
							
							
								
								Add support for FP->INT conversions and back.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19369 
							
						 
						
							2005-01-08 08:08:56 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								e69daaf71d 
								
							 
						 
						
							
							
								
								Implement the 'store FPIMM, Ptr' -> 'store INTIMM, Ptr' optimization for  
							
							 
							
							... 
							
							
							
							all targets.
llvm-svn: 19366 
							
						 
						
							2005-01-08 06:25:56 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								a65a2f0c36 
								
							 
						 
						
							
							
								
								Add support for truncating integer casts from long.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19358 
							
						 
						
							2005-01-07 22:37:48 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ea4ca94cae 
								
							 
						 
						
							
							
								
								Fix a bug in load expansion legalization and ret legalization.  This fixes  
							
							 
							
							... 
							
							
							
							CodeGen/Generic/select.ll:castconst.
llvm-svn: 19357 
							
						 
						
							2005-01-07 22:28:47 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								68a12140c0 
								
							 
						 
						
							
							
								
								Legalize unconditional branches too  
							
							 
							
							... 
							
							
							
							llvm-svn: 19356 
							
						 
						
							2005-01-07 22:12:08 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								19a83990e1 
								
							 
						 
						
							
							
								
								Implement support for long GEP indices on 32-bit archs and support for  
							
							 
							
							... 
							
							
							
							int GEP indices on 64-bit archs.
llvm-svn: 19354 
							
						 
						
							2005-01-07 21:56:57 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								32f20bfa93 
								
							 
						 
						
							
							
								
								implement legalization of a bunch more operators.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19352 
							
						 
						
							2005-01-07 21:45:56 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								fa854eb012 
								
							 
						 
						
							
							
								
								Fix another bug legalizing calls!  
							
							 
							
							... 
							
							
							
							llvm-svn: 19350 
							
						 
						
							2005-01-07 21:35:32 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f025d6788c 
								
							 
						 
						
							
							
								
								Fix a bug legalizing calls  
							
							 
							
							... 
							
							
							
							llvm-svn: 19348 
							
						 
						
							2005-01-07 21:34:13 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								473825ccec 
								
							 
						 
						
							
							
								
								After legalizing a DAG, delete dead nodes to save space.  
							
							 
							
							... 
							
							
							
							llvm-svn: 19346 
							
						 
						
							2005-01-07 21:09:37 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ec3fe7c4a8 
								
							 
						 
						
							
							
								
								Teach legalize how to handle condbranches  
							
							 
							
							... 
							
							
							
							llvm-svn: 19339 
							
						 
						
							2005-01-07 08:19:42 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								dc75059005 
								
							 
						 
						
							
							
								
								Initial implementation of the DAG legalization. This still has a long way  
							
							 
							
							... 
							
							
							
							to go, but it does work for some non-trivial cases now.
llvm-svn: 19329 
							
						 
						
							2005-01-07 07:47:09 +00:00