[llvm-commits] [llvm-gcc-4.2] r48641 - /llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
Evan Cheng
evan.cheng at apple.com
Fri Mar 21 02:20:03 PDT 2008
Author: evancheng
Date: Fri Mar 21 04:20:03 2008
New Revision: 48641
URL: http://llvm.org/viewvc/llvm-project?rev=48641&view=rev
Log:
Fix for PR2107. Improve __builtin_ia32_loadlv4si lowering to avoid casting to double.
Modified:
llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp?rev=48641&r1=48640&r2=48641&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Fri Mar 21 04:20:03 2008
@@ -392,17 +392,17 @@
return true;
case IX86_BUILTIN_MOVQ: {
Value *Zero = ConstantInt::get(Type::Int32Ty, 0);
- Ops[1] = BuildVector(Zero, Zero, Zero, Zero, NULL);
- Result = BuildVectorShuffle(Ops[1], Ops[0], 4, 5, 2, 3);
+ Result = BuildVector(Zero, Zero, Zero, Zero, NULL);
+ Result = BuildVectorShuffle(Result, Ops[0], 4, 5, 2, 3);
return true;
}
case IX86_BUILTIN_LOADQ: {
- PointerType *f64Ptr = PointerType::getUnqual(Type::DoubleTy);
- Value *Zero = ConstantFP::get(Type::DoubleTy, APFloat(0.0));
- Ops[0] = Builder.CreateBitCast(Ops[0], f64Ptr, "tmp");
+ PointerType *v4i32Ptr = PointerType::getUnqual(ResultType);
+ Ops[0] = Builder.CreateBitCast(Ops[0], v4i32Ptr, "tmp");
Ops[0] = Builder.CreateLoad(Ops[0], "tmp");
- Result = BuildVector(Ops[0], Zero, NULL);
- Result = Builder.CreateBitCast(Result, ResultType, "tmp");
+ Value *Zero = ConstantInt::get(Type::Int32Ty, 0);
+ Result = BuildVector(Zero, Zero, Zero, Zero, NULL);
+ Result = BuildVectorShuffle(Result, Ops[0], 4, 5, 2, 3);
return true;
}
case IX86_BUILTIN_LOADHPS: {
More information about the llvm-commits
mailing list