summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Change inferred getCast into specific getCast. Passes all tests.Reid Spencer2006-12-128-20/+37
| | | | llvm-svn: 32469
* Patch for PR1045 and Transforms/ScalarRepl/2006-12-11-SROA-Crash.llChris Lattner2006-12-121-0/+2
| | | | llvm-svn: 32468
* Revert Nate's patch to fix X86/store-fp-constant.ll. With the dag combinerChris Lattner2006-12-121-0/+18
| | | | | | | and legalizer separated like they currently are, I don't see a way to handle this xform. llvm-svn: 32466
* make this code more aggressive about turning store fpimm into store int imm.Chris Lattner2006-12-121-9/+32
| | | | | | This is not sufficient to fix X86/store-fp-constant.ll llvm-svn: 32465
* teach scev to analyze X*4|1 like X*4+c. This allows us to produce:Chris Lattner2006-12-121-1/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LBB1_1: #bb movdqa (%esi), %xmm2 movaps %xmm2, %xmm3 punpcklbw %xmm0, %xmm3 movaps %xmm3, %xmm4 punpcklwd %xmm0, %xmm4 cvtdq2ps %xmm4, %xmm4 mulps %xmm1, %xmm4 movaps %xmm4, (%edi) leal 1(,%eax,4), %ebx shll $4, %ebx punpckhwd %xmm0, %xmm3 cvtdq2ps %xmm3, %xmm3 mulps %xmm1, %xmm3 movaps %xmm3, (%edx,%ebx) leal 2(,%eax,4), %ebx shll $4, %ebx punpckhbw %xmm0, %xmm2 movaps %xmm2, %xmm3 punpcklwd %xmm0, %xmm3 cvtdq2ps %xmm3, %xmm3 mulps %xmm1, %xmm3 movaps %xmm3, (%edx,%ebx) leal 3(,%eax,4), %ebx shll $4, %ebx punpckhwd %xmm0, %xmm2 cvtdq2ps %xmm2, %xmm2 mulps %xmm1, %xmm2 movaps %xmm2, (%edx,%ebx) addl $64, %edi incl %eax addl $16, %esi cmpl %ecx, %eax jne LBB1_1 #bb instead of: LBB1_1: #bb movdqa (%esi), %xmm2 movaps %xmm2, %xmm3 punpcklbw %xmm0, %xmm3 movaps %xmm3, %xmm4 punpcklwd %xmm0, %xmm4 cvtdq2ps %xmm4, %xmm4 mulps %xmm1, %xmm4 movaps %xmm4, (%edi) leal 1(,%eax,4), %ebx shll $4, %ebx punpckhwd %xmm0, %xmm3 cvtdq2ps %xmm3, %xmm3 mulps %xmm1, %xmm3 movaps %xmm3, (%edx,%ebx) leal 2(,%eax,4), %ebx shll $4, %ebx punpckhbw %xmm0, %xmm2 movaps %xmm2, %xmm3 punpcklwd %xmm0, %xmm3 cvtdq2ps %xmm3, %xmm3 mulps %xmm1, %xmm3 movaps %xmm3, (%edx,%ebx) leal 3(,%eax,4), %ebx shll $4, %ebx punpckhwd %xmm0, %xmm2 cvtdq2ps %xmm2, %xmm2 mulps %xmm1, %xmm2 movaps %xmm2, (%edx,%ebx) addl $64, %edi incl %eax addl $16, %esi cmpl %ecx, %eax jne LBB1_1 #bb for a testcase. llvm-svn: 32463
* Tidy up a bit.Reid Spencer2006-12-121-1/+1
| | | | llvm-svn: 32462
* Change inferred cast creation calls to more specific cast creations.Reid Spencer2006-12-125-9/+13
| | | | llvm-svn: 32460
* use MVN to handle small negative constantsRafael Espindola2006-12-122-0/+32
| | | | llvm-svn: 32459
* Implement getIntegerCast and getFPCast for ConstantExpr. These are similarReid Spencer2006-12-121-0/+23
| | | | | | to the createIntegerCast and createFPCast for CastInst instructions. llvm-svn: 32457
* Implement createIntegerCast and createFPCast factory methods for handlingReid Spencer2006-12-121-0/+52
| | | | | | | | integer and floating point cast creation. createIntegerCast generates ZExt/SExt, BitCast or Trunc. createFPCast generates FPExt, Bitcast, or FPTrunc. llvm-svn: 32456
* add mvnRafael Espindola2006-12-121-0/+3
| | | | llvm-svn: 32454
* Fix the BitCastUnion type for 32-bit targets.Reid Spencer2006-12-121-6/+6
| | | | llvm-svn: 32453
* add noteRafael Espindola2006-12-111-0/+13
| | | | llvm-svn: 32452
* Another step forward in PPC64 JIT support: we now no-longer need stubsChris Lattner2006-12-115-33/+83
| | | | | | | | | | emitted for external globals in PPC64-JIT-PIC mode (which is good because we didn't handle them before!). This also fixes a bug handling the picbase delta, which we would get wrong in some cases. llvm-svn: 32451
* Create the cast constant expression that was read instead of attemptingReid Spencer2006-12-111-1/+2
| | | | | | | to infer the cast from its operand and type. This fixes: test/Regression/Bytecode/2006-12-11-Cast-ConstExpr.ll llvm-svn: 32450
* getInstrItineraryData shouldn't copy the itinerariesChris Lattner2006-12-111-1/+1
| | | | llvm-svn: 32448
* Fix constant folding of FP->int due to cut & paste error in last commit.Reid Spencer2006-12-111-2/+3
| | | | llvm-svn: 32447
* Implement correct bitcast of int<->float and long<->double by using aReid Spencer2006-12-111-14/+58
| | | | | | union to perform the bitcast. llvm-svn: 32444
* Re-apply changes that were backed out and fix a naughty typo.Evan Cheng2006-12-111-10/+15
| | | | llvm-svn: 32442
* It seems the llvm::OStream class does not handle stream manipulators.John Criswell2006-12-111-7/+7
| | | | | | For now, just grab the stream and perform the output on it directly. llvm-svn: 32441
* Revert changes that broke oggenc on ppcChris Lattner2006-12-111-14/+9
| | | | llvm-svn: 32440
* Missing opcode.Jim Laskey2006-12-111-0/+1
| | | | llvm-svn: 32439
* Implement correct constant folding of bitcast. This implementsChris Lattner2006-12-111-15/+33
| | | | | | | Transforms/ConstProp/bitcast.ll and fixes SingleSource/Regression/C/2003-10-12-GlobalVarInitializers llvm-svn: 32438
* Layout proper frame for ppc64.Jim Laskey2006-12-111-28/+38
| | | | llvm-svn: 32436
* Don't convert store double C, Ptr to store long C, Ptr if i64 is not a legal ↵Evan Cheng2006-12-111-9/+12
| | | | | | type. llvm-svn: 32434
* f32 / f64 node is expanded to one i32 / i64 node.Evan Cheng2006-12-111-5/+12
| | | | llvm-svn: 32433
* Clean up some bad code.Evan Cheng2006-12-111-5/+3
| | | | llvm-svn: 32432
* Move something that should be in the dag combiner from the legalizer to theNate Begeman2006-12-112-17/+15
| | | | | | dag combiner. llvm-svn: 32431
* Properly mangles symbol table namesNate Begeman2006-12-112-139/+362
| | | | | | | | | Supports constant pools Supports relocations to jump tables Supports relocations within the data segment (global = address of global) Allocates memory in a non-hacky for all non-code objects. llvm-svn: 32430
* fix typoChris Lattner2006-12-111-1/+1
| | | | llvm-svn: 32428
* Update note, with the SROA change, we now produce:Chris Lattner2006-12-111-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | _pairtest: movl 8(%esp), %eax movl 4(%esp), %ecx movd %eax, %xmm0 movd %ecx, %xmm1 addss %xmm0, %xmm1 movl 12(%esp), %eax movss %xmm1, (%eax) ret instead of: _pairtest: subl $12, %esp movl 20(%esp), %eax movl %eax, 4(%esp) movl 16(%esp), %eax movl %eax, (%esp) movss (%esp), %xmm0 addss 4(%esp), %xmm0 movl 24(%esp), %eax movss %xmm0, (%eax) addl $12, %esp ret llvm-svn: 32427
* trunc to integer, not to FP.Chris Lattner2006-12-111-2/+11
| | | | llvm-svn: 32426
* this is doneChris Lattner2006-12-111-27/+0
| | | | llvm-svn: 32424
* Evan implemented the machineinstr improvements.Chris Lattner2006-12-111-46/+23
| | | | | | | | The rot example works if the type is cast to ubyte. Move sroa examples together and upgrade them to HEAD syntax. llvm-svn: 32423
* implement promotion of unions containing two packed types of the same width.Chris Lattner2006-12-111-15/+30
| | | | | | This implements Transforms/ScalarRepl/union-packed.ll llvm-svn: 32422
* clarify some comments, simplify some checks, fix:Chris Lattner2006-12-111-7/+7
| | | | | | Regression/Transforms/IndVarsSimplify/2006-12-10-BitCast.ll llvm-svn: 32420
* * Eliminate calls to CastInst::createInferredCast.Chris Lattner2006-12-101-40/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add support for promoting unions with fp values in them. This produces our new int<->fp bitcast instructions, implementing Transforms/ScalarRepl/union-fp-int.ll As an example, this allows us to compile this: union intfloat { int i; float f; }; float invsqrt(const float arg_x) { union intfloat x = { .f = arg_x }; const float xhalf = arg_x * 0.5f; x.i = 0x5f3759df - (x.i >> 1); return x.f * (1.5f - xhalf * x.f * x.f); } into: _invsqrt: movss 4(%esp), %xmm0 movd %xmm0, %eax sarl %eax movl $1597463007, %ecx subl %eax, %ecx movd %ecx, %xmm1 mulss LCPI1_0, %xmm0 mulss %xmm1, %xmm0 movss LCPI1_1, %xmm2 mulss %xmm1, %xmm0 subss %xmm0, %xmm2 movl 8(%esp), %eax mulss %xmm2, %xmm1 movss %xmm1, (%eax) ret instead of: _invsqrt: subl $4, %esp movss 8(%esp), %xmm0 movss %xmm0, (%esp) movl (%esp), %eax movl $1597463007, %ecx sarl %eax subl %eax, %ecx movl %ecx, (%esp) mulss LCPI1_0, %xmm0 movss (%esp), %xmm1 mulss %xmm1, %xmm0 mulss %xmm1, %xmm0 movss LCPI1_1, %xmm2 subss %xmm0, %xmm2 mulss %xmm2, %xmm1 movl 12(%esp), %eax movss %xmm1, (%eax) addl $4, %esp ret llvm-svn: 32418
* Cleaned setjmp/longjmp lowering interfaces. Now we're producing rightAnton Korobeynikov2006-12-105-13/+20
| | | | | | | code (both asm & cbe) for Mingw32 target. Removed autoconf checks for underscored versions of setjmp/longjmp. llvm-svn: 32415
* Reverting until finding the cause of secondary bugs.Jim Laskey2006-12-101-33/+28
| | | | llvm-svn: 32413
* __PPC64CompilationCallback code was allowing registers to be clobbered by stub.Jim Laskey2006-12-101-28/+33
| | | | llvm-svn: 32412
* fix PR1039 by making timing info be destroyed by llvm_shutdown, not byChris Lattner2006-12-102-4/+5
| | | | | | static dtors. llvm-svn: 32411
* .align is in bitsRafael Espindola2006-12-101-1/+1
| | | | | | | .comm is in bytes :-( llvm-svn: 32408
* fix test/Regression/CodeGen/X86/weak.llRafael Espindola2006-12-091-1/+1
| | | | | | if a variable has no initialization, I->getInitializer() will fail llvm-svn: 32407
* Preliminary soft float support.Evan Cheng2006-12-093-19/+74
| | | | llvm-svn: 32394
* Added option -soft-float to generate SW fp library calls instead of fp ↵Evan Cheng2006-12-091-0/+7
| | | | | | instructions. llvm-svn: 32393
* Analysis resolver now manages AnalysisImpls for the given patch.Devang Patel2006-12-091-1/+2
| | | | llvm-svn: 32389
* Top level pass manager keeps track of other managers, so this can beDevang Patel2006-12-091-8/+1
| | | | | | removed now. llvm-svn: 32388
* Use analysis resolver to find the info.Devang Patel2006-12-091-8/+11
| | | | llvm-svn: 32387
* Do not drop ImmutablePasses on the floor.Devang Patel2006-12-081-7/+9
| | | | llvm-svn: 32386
* Set AnalysisResolver for the passes when they are inserted intoDevang Patel2006-12-081-0/+29
| | | | | | pass manager queuer. llvm-svn: 32385
OpenPOWER on IntegriCloud