[llvm-commits] [llvm-gcc-4.2] r45279 - /llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp

Evan Cheng evan.cheng at apple.com
Thu Dec 20 17:31:34 PST 2007


Author: evancheng
Date: Thu Dec 20 19:31:34 2007
New Revision: 45279

URL: http://llvm.org/viewvc/llvm-project?rev=45279&view=rev
Log:
More bug fixes: add necessary bitcast's.

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=45279&r1=45278&r2=45279&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 Thu Dec 20 19:31:34 2007
@@ -89,6 +89,7 @@
       Intrinsic::getDeclaration(TheModule, Intrinsic::x86_sse2_psll_w);
     Value *Undef = UndefValue::get(Type::Int32Ty);
     Ops[1] = BuildVector(Ops[1], Undef, Undef, Undef, NULL);
+    Ops[1] = Builder.CreateBitCast(Ops[1], Ops[0]->getType(), "tmp");
     Result = Builder.CreateCall(psllw, Ops.begin(), Ops.begin()+2, "tmp");
     Result = Builder.CreateBitCast(Result, ResultType, "tmp");
     return true;
@@ -123,6 +124,7 @@
       Intrinsic::getDeclaration(TheModule, Intrinsic::x86_sse2_psll_q);
     Value *Undef = UndefValue::get(Type::Int32Ty);
     Ops[1] = BuildVector(Ops[1], Undef, Undef, Undef, NULL);
+    Ops[1] = Builder.CreateBitCast(Ops[1], Ops[0]->getType(), "tmp");
     Result = Builder.CreateCall(psllq, Ops.begin(), Ops.begin()+2, "tmp");
     Result = Builder.CreateBitCast(Result, ResultType, "tmp");
     return true;
@@ -140,6 +142,7 @@
       Intrinsic::getDeclaration(TheModule, Intrinsic::x86_sse2_psrl_w);
     Value *Undef = UndefValue::get(Type::Int32Ty);
     Ops[1] = BuildVector(Ops[1], Undef, Undef, Undef, NULL);
+    Ops[1] = Builder.CreateBitCast(Ops[1], Ops[0]->getType(), "tmp");
     Result = Builder.CreateCall(psrlw, Ops.begin(), Ops.begin()+2, "tmp");
     Result = Builder.CreateBitCast(Result, ResultType, "tmp");
     return true;
@@ -174,6 +177,7 @@
       Intrinsic::getDeclaration(TheModule, Intrinsic::x86_sse2_psrl_q);
     Value *Undef = UndefValue::get(Type::Int32Ty);
     Ops[1] = BuildVector(Ops[1], Undef, Undef, Undef, NULL);
+    Ops[1] = Builder.CreateBitCast(Ops[1], Ops[0]->getType(), "tmp");
     Result = Builder.CreateCall(psrlq, Ops.begin(), Ops.begin()+2, "tmp");
     Result = Builder.CreateBitCast(Result, ResultType, "tmp");
     return true;





More information about the llvm-commits mailing list