[llvm-commits] CVS: llvm-test/External/Makefile
Changes in directory llvm-test/External: Makefile updated: 1.22 - 1.23 --- Log message: Added Nurbs --- Diffs of the changes: (+5 -1) Makefile |6 +- 1 files changed, 5 insertions(+), 1 deletion(-) Index: llvm-test/External/Makefile diff -u llvm-test/External/Makefile:1.22 llvm-test/External/Makefile:1.23 --- llvm-test/External/Makefile:1.22Thu Nov 4 10:57:42 2004 +++ llvm-test/External/Makefile Fri Apr 21 03:19:02 2006 @@ -8,7 +8,7 @@ # # Create the list of directories to compile # -PARALLEL_DIRS := SPEC Povray Namd FPGrowth BoxedSim +PARALLEL_DIRS := SPEC Povray Namd FPGrowth BoxedSim Nurbs ifndef USE_POVRAY PARALLEL_DIRS := $(filter-out Povray, $(PARALLEL_DIRS)) @@ -26,6 +26,10 @@ PARALLEL_DIRS := $(filter-out BoxedSim, $(PARALLEL_DIRS)) endif +ifndef USE_NURBS +PARALLEL_DIRS := $(filter-out Nurbs, $(PARALLEL_DIRS)) +endif + # Sparc can't handle Namd: infinite loop, cause unknown ifeq ($(ARCH),Sparc) PARALLEL_DIRS := $(filter-out Namd, $(PARALLEL_DIRS)) ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.149 - 1.150 --- Log message: Fix a couple more memory issues --- Diffs of the changes: (+4 -4) DAGCombiner.cpp |8 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.149 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.150 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.149 Thu Apr 20 18:55:59 2006 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Fri Apr 21 10:32:26 2006 @@ -739,7 +739,7 @@ return N1.getOperand(0); if (!MVT::isVector(VT) SimplifyDemandedBits(SDOperand(N, 0))) -return SDOperand(); +return SDOperand(N, 0); // fold (a+b) - (a|b) iff a and b share no bits. if (MVT::isInteger(VT) !MVT::isVector(VT)) { @@ -1144,7 +1144,7 @@ // fold (and (sra)) - (and (srl)) when possible. if (!MVT::isVector(VT) SimplifyDemandedBits(SDOperand(N, 0))) -return SDOperand(); +return SDOperand(N, 0); // fold (zext_inreg (extload x)) - (zextload x) if (N0.getOpcode() == ISD::EXTLOAD) { MVT::ValueType EVT = castVTSDNode(N0.getOperand(3))-getVT(); @@ -1452,7 +1452,7 @@ // Simplify the expression using non-local knowledge. if (!MVT::isVector(VT) SimplifyDemandedBits(SDOperand(N, 0))) -return SDOperand(); +return SDOperand(N, 0); return SDOperand(); } @@ -1481,7 +1481,7 @@ if (TLI.MaskedValueIsZero(SDOperand(N, 0), MVT::getIntVTBitMask(VT))) return DAG.getConstant(0, VT); if (SimplifyDemandedBits(SDOperand(N, 0))) -return SDOperand(); +return SDOperand(N, 0); // fold (shl (shl x, c1), c2) - 0 or (shl x, c1+c2) if (N1C N0.getOpcode() == ISD::SHL N0.getOperand(1).getOpcode() == ISD::Constant) { ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/VMCore/Type.cpp
Changes in directory llvm/lib/VMCore: Type.cpp updated: 1.138 - 1.139 --- Log message: Remove a hack required by V9. --- Diffs of the changes: (+2 -4) Type.cpp |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) Index: llvm/lib/VMCore/Type.cpp diff -u llvm/lib/VMCore/Type.cpp:1.138 llvm/lib/VMCore/Type.cpp:1.139 --- llvm/lib/VMCore/Type.cpp:1.138 Sat Apr 1 23:40:28 2006 +++ llvm/lib/VMCore/Type.cppFri Apr 21 10:33:35 2006 @@ -1192,10 +1192,8 @@ PointerType *PointerType::get(const Type *ValueType) { assert(ValueType Can't get a pointer to null type!); - // FIXME: The sparc backend makes void pointers, which is horribly broken. - // Fix it, then reenable this assertion. - //assert(ValueType != Type::VoidTy - // Pointer to void is not valid, use sbyte* instead!); + assert(ValueType != Type::VoidTy + Pointer to void is not valid, use sbyte* instead!); PointerValType PVT(ValueType); PointerType *PT = PointerTypes.get(PVT); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/vec_splat.ll
Changes in directory llvm/test/Regression/CodeGen/X86: vec_splat.ll updated: 1.5 - 1.6 --- Log message: movddup is a SSE3 instruction. --- Diffs of the changes: (+1 -1) vec_splat.ll |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Regression/CodeGen/X86/vec_splat.ll diff -u llvm/test/Regression/CodeGen/X86/vec_splat.ll:1.5 llvm/test/Regression/CodeGen/X86/vec_splat.ll:1.6 --- llvm/test/Regression/CodeGen/X86/vec_splat.ll:1.5 Thu Apr 20 23:58:23 2006 +++ llvm/test/Regression/CodeGen/X86/vec_splat.ll Fri Apr 21 11:42:47 2006 @@ -1,5 +1,5 @@ ; RUN: llvm-as %s | llc -march=x86 -mattr=+sse2 | grep shufps -; RUN: llvm-as %s | llc -march=x86 -mattr=+sse2 | grep movddup +; RUN: llvm-as %s | llc -march=x86 -mattr=+sse3 | grep movddup void %test_v4sf(4 x float* %P, 4 x float* %Q, float %X) { %tmp = insertelement 4 x float zeroinitializer, float %X, uint 0 ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.222 - 1.223 --- Log message: The BFS scheduler is apparently nondeterminstic (causes many llvmgcc bootstrap miscompares). Switch RISC targets to use the list-td scheduler, which isn't. --- Diffs of the changes: (+5 -2) SelectionDAGISel.cpp |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.222 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.223 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.222Wed Apr 12 11:20:43 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Fri Apr 21 12:16:16 2006 @@ -3126,9 +3126,12 @@ default: assert(0 Unrecognized scheduling heuristic); case defaultScheduling: if (TLI.getSchedulingPreference() == TargetLowering::SchedulingForLatency) - SL = createSimpleDAGScheduler(noScheduling, DAG, BB); -else /* TargetLowering::SchedulingForRegPressure */ + SL = createTDListDAGScheduler(DAG, BB, CreateTargetHazardRecognizer()); +else { + assert(TLI.getSchedulingPreference() == + TargetLowering::SchedulingForRegPressure Unknown sched type!); SL = createBURRListDAGScheduler(DAG, BB); +} break; case noScheduling: SL = createBFS_DAGScheduler(DAG, BB); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/README.txt
Changes in directory llvm/lib/Target/X86: README.txt updated: 1.93 - 1.94 --- Log message: add some low-prio notes --- Diffs of the changes: (+69 -0) README.txt | 69 + 1 files changed, 69 insertions(+) Index: llvm/lib/Target/X86/README.txt diff -u llvm/lib/Target/X86/README.txt:1.93 llvm/lib/Target/X86/README.txt:1.94 --- llvm/lib/Target/X86/README.txt:1.93 Wed Apr 19 00:53:27 2006 +++ llvm/lib/Target/X86/README.txt Fri Apr 21 16:03:21 2006 @@ -1054,3 +1054,72 @@ //===-===// +Consider: + +__m128 test(float a) { + return _mm_set_ps(0.0, 0.0, 0.0, a*a); +} + +This compiles into: + +movss 4(%esp), %xmm1 +mulss %xmm1, %xmm1 +xorps %xmm0, %xmm0 +movss %xmm1, %xmm0 +ret + +Because mulss multiplies 0*0 = 0.0, the top elements of xmm1 are already zerod. +We could compile this to: + +movss 4(%esp), %xmm0 +mulss %xmm0, %xmm0 +ret + +//===-===// + +Here's a sick and twisted idea. Consider code like this: + +__m128 test(__m128 a) { + float b = *(float*)A; + ... + return _mm_set_ps(0.0, 0.0, 0.0, b); +} + +This might compile to this code: + +movaps c(%esp), %xmm1 +xorps %xmm0, %xmm0 +movss %xmm1, %xmm0 +ret + +Now consider if the ... code caused xmm1 to get spilled. This might produce +this code: + +movaps c(%esp), %xmm1 +movaps %xmm1, c2(%esp) +... + +xorps %xmm0, %xmm0 +movaps c2(%esp), %xmm1 +movss %xmm1, %xmm0 +ret + +However, since the reload is only used by these instructions, we could +fold it into the uses, producing something like this: + +movaps c(%esp), %xmm1 +movaps %xmm1, c2(%esp) +... + +movss c2(%esp), %xmm0 +ret + +... saving two instructions. + +The basic idea is that a reload from a spill slot, can, if only one 4-byte +chunk is used, bring in 3 zeros the the one element instead of 4 elements. +This can be used to simplify a variety of shuffle operations, where the +elements are fixed zeros. + +//===-===// + ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/README.txt
Changes in directory llvm/lib/Target/X86: README.txt updated: 1.94 - 1.95 --- Log message: fix thinko --- Diffs of the changes: (+2 -2) README.txt |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Target/X86/README.txt diff -u llvm/lib/Target/X86/README.txt:1.94 llvm/lib/Target/X86/README.txt:1.95 --- llvm/lib/Target/X86/README.txt:1.94 Fri Apr 21 16:03:21 2006 +++ llvm/lib/Target/X86/README.txt Fri Apr 21 16:05:22 2006 @@ -1068,8 +1068,8 @@ movss %xmm1, %xmm0 ret -Because mulss multiplies 0*0 = 0.0, the top elements of xmm1 are already zerod. -We could compile this to: +Because mulss doesn't modify the top 3 elements, the top elements of +xmm1 are already zero'd. We could compile this to: movss 4(%esp), %xmm0 mulss %xmm0, %xmm0 ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/docs/LangRef.html
Changes in directory llvm/docs: LangRef.html updated: 1.149 - 1.150 --- Log message: typo --- Diffs of the changes: (+2 -2) LangRef.html |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.149 llvm/docs/LangRef.html:1.150 --- llvm/docs/LangRef.html:1.149Fri Apr 14 14:24:33 2006 +++ llvm/docs/LangRef.html Fri Apr 21 16:37:40 2006 @@ -3748,7 +3748,7 @@ p The 'ttllvm.ctlz/tt' intrinsic counts the leading (most significant) zeros in a variable. If the src == 0 then the result is the size in bits of the type -of src. For example, ttllvm.cttz(int 2) = 30/tt. +of src. For example, ttllvm.ctlz(int 2) = 30/tt. /p /div @@ -3817,7 +3817,7 @@ a href=mailto:[EMAIL PROTECTED]Chris Lattner/abr a href=http://llvm.org;The LLVM Compiler Infrastructure/abr - Last modified: $Date: 2006/04/14 19:24:33 $ + Last modified: $Date: 2006/04/21 21:37:40 $ /address /body /html ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp PPCJITInfo.cpp PPCTargetMachine.cpp
Changes in directory llvm/lib/Target/PowerPC: PPCCodeEmitter.cpp updated: 1.50 - 1.51 PPCJITInfo.cpp updated: 1.17 - 1.18 PPCTargetMachine.cpp updated: 1.86 - 1.87 --- Log message: Change the PPC JIT to use a Static relocation model --- Diffs of the changes: (+4 -29) PPCCodeEmitter.cpp | 18 ++ PPCJITInfo.cpp | 13 + PPCTargetMachine.cpp |2 +- 3 files changed, 4 insertions(+), 29 deletions(-) Index: llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp diff -u llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.50 llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.51 --- llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.50 Mon Apr 17 16:07:20 2006 +++ llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp Fri Apr 21 17:04:15 2006 @@ -157,11 +157,6 @@ } else if (MO.isImmediate()) { rv = MO.getImmedValue(); } else if (MO.isGlobalAddress() || MO.isExternalSymbol()) { -bool isExternal = MO.isExternalSymbol() || - MO.getGlobal()-hasWeakLinkage() || - MO.getGlobal()-hasLinkOnceLinkage() || - (MO.getGlobal()-isExternal() - !MO.getGlobal()-hasNotBeenReadFromBytecode()); unsigned Reloc = 0; if (MI.getOpcode() == PPC::BL) Reloc = PPC::reloc_pcrel_bx; @@ -169,15 +164,9 @@ switch (MI.getOpcode()) { default: MI.dump(); assert(0 Unknown instruction for relocation!); case PPC::LIS: -if (isExternal) - Reloc = PPC::reloc_absolute_ptr_high; // Pointer to stub -else - Reloc = PPC::reloc_absolute_high; // Pointer to symbol +Reloc = PPC::reloc_absolute_high; // Pointer to symbol break; case PPC::LA: -assert(!isExternal Something in the ISEL changed\n); -Reloc = PPC::reloc_absolute_low; -break; case PPC::LBZ: case PPC::LHA: case PPC::LHZ: @@ -189,10 +178,7 @@ case PPC::STW: case PPC::STFS: case PPC::STFD: -if (isExternal) - Reloc = PPC::reloc_absolute_ptr_low; -else - Reloc = PPC::reloc_absolute_low; +Reloc = PPC::reloc_absolute_low; break; } } Index: llvm/lib/Target/PowerPC/PPCJITInfo.cpp diff -u llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.17 llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.18 --- llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.17 Sun Oct 16 00:39:50 2005 +++ llvm/lib/Target/PowerPC/PPCJITInfo.cpp Fri Apr 21 17:04:15 2006 @@ -201,19 +201,8 @@ Relocation out of range!); *RelocPos |= (ResultPtr ((1 24)-1)) 2; break; - case PPC::reloc_absolute_ptr_high: // Pointer relocations. -case PPC::reloc_absolute_ptr_low: { - // Pointer relocations are used for the PPC external stubs and lazy - // resolver pointers that the Darwin ABI likes to use. Basically, the - // address of the global is actually stored in memory, and the address of - // the pointer is relocated into instructions instead of the pointer - // itself. Because we have to keep the mapping anyway, we just return - // pointers to the values in the map as our new location. - static std::setvoid* Pointers; - ResultPtr = (intptr_t)*Pointers.insert((void*)ResultPtr).first; -} - // FALL THROUGH +case PPC::reloc_absolute_ptr_low: case PPC::reloc_absolute_high: // high bits of ref - low 16 of instr case PPC::reloc_absolute_low: // low bits of ref - low 16 of instr ResultPtr += MR-getConstantVal(); Index: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp diff -u llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.86 llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.87 --- llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.86 Sat Apr 8 14:46:55 2006 +++ llvm/lib/Target/PowerPC/PPCTargetMachine.cppFri Apr 21 17:04:15 2006 @@ -130,7 +130,7 @@ void PPCJITInfo::addPassesToJITCompile(FunctionPassManager PM) { // The JIT should use dynamic-no-pic relocation model. - TM.setRelocationModel(Reloc::DynamicNoPIC); + TM.setRelocationModel(Reloc::Static); // Run loop strength reduction before anything else. PM.add(createLoopStrengthReducePass(TM.getTargetLowering())); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
Changes in directory llvm/lib/Target/PowerPC: PPCTargetMachine.cpp updated: 1.87 - 1.88 --- Log message: Fix the comment --- Diffs of the changes: (+1 -1) PPCTargetMachine.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp diff -u llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.87 llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.88 --- llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.87 Fri Apr 21 17:04:15 2006 +++ llvm/lib/Target/PowerPC/PPCTargetMachine.cppFri Apr 21 17:11:27 2006 @@ -129,7 +129,7 @@ } void PPCJITInfo::addPassesToJITCompile(FunctionPassManager PM) { - // The JIT should use dynamic-no-pic relocation model. + // The JIT should use the static relocation model. TM.setRelocationModel(Reloc::Static); // Run loop strength reduction before anything else. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp
Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.179 - 1.180 --- Log message: Revamp build_vector lowering to take advantage of movss and movd instructions. movd always clear the top 96 bits and movss does so when it's loading the value from memory. The net result is codegen for 4-wide shuffles is much improved. It is near optimal if one or more elements is a zero. e.g. __m128i test(int a, int b) { return _mm_set_epi32(0, 0, b, a); } compiles to _test: movd 8(%esp), %xmm1 movd 4(%esp), %xmm0 punpckldq %xmm1, %xmm0 ret compare to gcc: _test: subl$12, %esp movd20(%esp), %xmm0 movd16(%esp), %xmm1 punpckldq %xmm0, %xmm1 movq%xmm1, %xmm0 movhps LC0, %xmm0 addl$12, %esp ret or icc: _test: movd 4(%esp), %xmm0#5.10 movd 8(%esp), %xmm3#5.10 xorl %eax, %eax#5.10 movd %eax, %xmm1 #5.10 punpckldq %xmm1, %xmm0 #5.10 movd %eax, %xmm2 #5.10 punpckldq %xmm2, %xmm3 #5.10 punpckldq %xmm3, %xmm0 #5.10 ret #5.10 There are still room for improvement, for example the FP variant of the above example: __m128 test(float a, float b) { return _mm_set_ps(0.0, 0.0, b, a); } _test: movss 8(%esp), %xmm1 movss 4(%esp), %xmm0 unpcklps %xmm1, %xmm0 xorps %xmm1, %xmm1 movlhps %xmm1, %xmm0 ret The xorps and movlhps are unnecessary. This will require post legalizer optimization to handle. --- Diffs of the changes: (+140 -63) X86ISelLowering.cpp | 203 +++- 1 files changed, 140 insertions(+), 63 deletions(-) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.179 llvm/lib/Target/X86/X86ISelLowering.cpp:1.180 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.179 Thu Apr 20 20:05:10 2006 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Fri Apr 21 18:03:30 2006 @@ -2138,19 +2138,19 @@ castConstantFPSDNode(Elt)-isExactlyValue(0.0))); } -/// getShuffleVectorAgainstZero - Return a vector_shuffle of a zero vector and -/// the specified vector. -static SDOperand getShuffleVectorAgainstZero(SDOperand Vec, MVT::ValueType VT, +/// getShuffleVectorZeroOrUndef - Return a vector_shuffle of the specified +/// vector and zero or undef vector. +static SDOperand getShuffleVectorZeroOrUndef(SDOperand V2, MVT::ValueType VT, unsigned NumElems, unsigned Idx, - SelectionDAG DAG) { - SDOperand ZeroV = getZeroVector(VT, DAG); + bool isZero, SelectionDAG DAG) { + SDOperand V1 = isZero ? getZeroVector(VT, DAG) : DAG.getNode(ISD::UNDEF, VT); MVT::ValueType MaskVT = MVT::getIntVectorWithNumElements(NumElems); MVT::ValueType EVT = MVT::getVectorBaseType(MaskVT); SDOperand Zero = DAG.getConstant(0, EVT); std::vectorSDOperand MaskVec(NumElems, Zero); MaskVec[Idx] = DAG.getConstant(NumElems, EVT); SDOperand Mask = DAG.getNode(ISD::BUILD_VECTOR, MaskVT, MaskVec); - return DAG.getNode(ISD::VECTOR_SHUFFLE, VT, ZeroV, Vec, Mask); + return DAG.getNode(ISD::VECTOR_SHUFFLE, VT, V1, V2, Mask); } /// LowerOperation - Provide custom lowering hooks for some operations. @@ -3005,7 +3005,7 @@ if (X86::isUNPCKL_v_undef_Mask(PermMask.Val) || X86::isUNPCKLMask(PermMask.Val) || -X86::isUNPCKHMask(PermMask.Val, V2IsSplat)) +X86::isUNPCKHMask(PermMask.Val)) return Op; if (V2IsSplat) { @@ -3137,82 +3137,159 @@ return Op; unsigned NumElems = Op.getNumOperands(); +unsigned Half = NumElems/2; MVT::ValueType VT = Op.getValueType(); MVT::ValueType EVT = MVT::getVectorBaseType(VT); -std::vectorunsigned NonZeros; +unsigned NumZero = 0; +unsigned NonZeros = 0; std::setSDOperand Values; for (unsigned i = 0; i NumElems; ++i) { - unsigned Idx = NumElems - i - 1; - SDOperand Elt = Op.getOperand(Idx); + SDOperand Elt = Op.getOperand(i); Values.insert(Elt); - if (!isZeroNode(Elt)) -NonZeros.push_back(Idx); + if (isZeroNode(Elt)) +NumZero++; + else if (Elt.getOpcode() != ISD::UNDEF) +NonZeros |= (1 i); } -if (NonZeros.size() == 0) +unsigned NumNonZero = CountPopulation_32(NonZeros); +if (NumNonZero == 0) return Op; -if (NonZeros.size() == 1) { - unsigned Idx = NonZeros[0]; +// Splat is obviously ok. Let legalizer
[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Vector/build2.c
Changes in directory llvm-test/SingleSource/UnitTests/Vector: build2.c added (r1.1) --- Log message: Add another vector test. --- Diffs of the changes: (+94 -0) build2.c | 94 +++ 1 files changed, 94 insertions(+) Index: llvm-test/SingleSource/UnitTests/Vector/build2.c diff -c /dev/null llvm-test/SingleSource/UnitTests/Vector/build2.c:1.1 *** /dev/null Fri Apr 21 18:22:33 2006 --- llvm-test/SingleSource/UnitTests/Vector/build2.cFri Apr 21 18:22:23 2006 *** *** 0 --- 1,94 + #include helpers.h + + v4f32 test0001(float a) { + return (v4f32){a, 0.0, 0.0, 0.0}; + } + + v4f32 test0010(float a) { + return (v4f32){0.0, a, 0.0, 0.0}; + } + + v4f32 test0100(float a) { + return (v4f32){0.0, 0.0, a, 0.0}; + } + + v4f32 test1000(float a) { + return (v4f32){0.0, 0.0, 0.0, a}; + } + + v4f32 test0011(float a, float b) { + return (v4f32){a, b, 0.0, 0.0}; + } + + v4f32 test0101(float a, float b) { + return (v4f32){a, 0.0, b, 0.0}; + } + + v4f32 test1001(float a, float b) { + return (v4f32){a, 0.0, 0.0, b}; + } + + v4f32 test0110(float a, float b) { + return (v4f32){0.0, a, b, 0.0}; + } + + v4f32 test1010(float a, float b) { + return (v4f32){0.0, a, 0.0, b}; + } + + v4f32 test1100(float a, float b) { + return (v4f32){0.0, 0.0, a, b}; + } + + v4f32 test0111(float a, float b, float c) { + return (v4f32){a, b, c, 0.0}; + } + + v4f32 test1011(float a, float b, float c) { + return (v4f32){a, b, 0.0, c}; + } + + v4f32 test1101(float a, float b, float c) { + return (v4f32){a, 0.0, b, c}; + } + + v4f32 test1110(float a, float b, float c) { + return (v4f32){0.0, a, b, c}; + } + + int main(int argc, char **argv) { + int i, j; + v4f32 x = {0.0f, 0.0f, 0.0f, 0.0f}; + v4f32 y = {0.0f, 0.0f, 0.0f, 0.0f}; + v4f32 z = {0.0f, 0.0f, 0.0f, 0.0f}; + + for (j = 0; j 100; ++j) { + x = (v4f32){0.0f, 0.0f, 0.0f, 0.0f}; + y = (v4f32){0.0f, 0.0f, 0.0f, 0.0f}; + z = (v4f32){0.0f, 0.0f, 0.0f, 0.0f}; + for (i = 0; i 200; ++i) { + x += test0001(1.0); + x += test0010(1.0); + x += test0100(1.0); + x += test1000(1.0); + + y += test0011(1.0, 2.0); + y += test0101(1.0, 2.0); + y += test1001(1.0, 2.0); + y += test0110(1.0, 2.0); + y += test1010(1.0, 2.0); + y += test1100(1.0, 2.0); + + z += test0111(2.0, 3.0, 1.0); + z += test1011(1.0, 1.0, 2.0); + z += test1101(3.0, 2.0, 4.0); + z += test1110(4.0, 6.0, 1.0); + } + } + + printFV(x); + printFV(y); + printFV(z); + + return 0; + } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/ExecutionEngine/ExecutionEngine.cpp
Changes in directory llvm/lib/ExecutionEngine: ExecutionEngine.cpp updated: 1.78 - 1.79 --- Log message: Fix JIT support for static ctors, which was apparently completely broken! This allows Prolangs-C++/city and probably a bunch of other stuff to work well with the new front-end --- Diffs of the changes: (+5 -1) ExecutionEngine.cpp |6 +- 1 files changed, 5 insertions(+), 1 deletion(-) Index: llvm/lib/ExecutionEngine/ExecutionEngine.cpp diff -u llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.78 llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.79 --- llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.78 Wed Mar 22 23:43:58 2006 +++ llvm/lib/ExecutionEngine/ExecutionEngine.cppSat Apr 22 00:02:46 2006 @@ -103,7 +103,11 @@ void ExecutionEngine::runStaticConstructorsDestructors(bool isDtors) { const char *Name = isDtors ? llvm.global_dtors : llvm.global_ctors; GlobalVariable *GV = CurMod.getNamedGlobal(Name); - if (!GV || GV-isExternal() || !GV-hasInternalLinkage()) return; + + // If this global has internal linkage, or if it has a use, then it must be + // an old-style (llvmgcc3) static ctor with __main linked in and in use. If + // this is the case, don't execute any of the global ctors, __main will do it. + if (!GV || GV-isExternal() || GV-hasInternalLinkage()) return; // Should be an array of '{ int, void ()* }' structs. The first value is the // init priority, which we ignore. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-db/Makefile
Changes in directory llvm/tools/llvm-db: Makefile updated: 1.8 - 1.9 --- Log message: This no longer needs the JIT. --- Diffs of the changes: (+1 -4) Makefile |5 + 1 files changed, 1 insertion(+), 4 deletions(-) Index: llvm/tools/llvm-db/Makefile diff -u llvm/tools/llvm-db/Makefile:1.8 llvm/tools/llvm-db/Makefile:1.9 --- llvm/tools/llvm-db/Makefile:1.8 Mon Nov 29 01:17:19 2004 +++ llvm/tools/llvm-db/Makefile Sat Apr 22 00:04:23 2006 @@ -9,9 +9,6 @@ LEVEL = ../.. TOOLNAME = llvm-db -USEDLIBS = LLVMDebugger - -# Enable JIT support -LLVMLIBS = JIT +USEDLIBS = LLVMDebugger LLVMBCReader LLVMCore LLVMSupport.a LLVMbzip2 LLVMSystem.a include $(LEVEL)/Makefile.common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits