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

Duncan Sands baldrick at free.fr
Wed May 12 12:50:41 PDT 2010


Author: baldrick
Date: Wed May 12 14:50:41 2010
New Revision: 103640

URL: http://llvm.org/viewvc/llvm-project?rev=103640&view=rev
Log:
Port commit 103622 (baldrick) from dragonegg:
TargetIntrinsicLower is only supposed to set Result if there is a
value to be returned, so it is wrong to set it to a StoreInst for
example.  Fix a bunch of mistakes of this kind.

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=103640&r1=103639&r2=103640&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 Wed May 12 14:50:41 2010
@@ -329,7 +329,6 @@
     Value *BC = Builder.CreateBitCast(Ops[0], v4f32Ptr);
     StoreInst *SI = Builder.CreateStore(Ops[1], BC);
     SI->setAlignment(1);
-    Result = SI;
     return true;
   }
   case IX86_BUILTIN_STOREUPD: {
@@ -338,7 +337,6 @@
     Value *BC = Builder.CreateBitCast(Ops[0], v2f64Ptr);
     StoreInst *SI = Builder.CreateStore(Ops[1], BC);
     SI->setAlignment(1);
-    Result = SI;
     return true;
   }
   case IX86_BUILTIN_STOREDQU: {
@@ -347,7 +345,6 @@
     Value *BC = Builder.CreateBitCast(Ops[0], v16i8Ptr);
     StoreInst *SI = Builder.CreateStore(Ops[1], BC);
     SI->setAlignment(1);
-    Result = SI;
     return true;
   }
   case IX86_BUILTIN_LOADHPS: {
@@ -600,7 +597,7 @@
     Value *Ptr = CreateTemporary(Type::getInt32Ty(Context));
     Builder.CreateStore(Ops[0], Ptr);
     Ptr = Builder.CreateBitCast(Ptr, Type::getInt8PtrTy(Context));
-    Result = Builder.CreateCall(ldmxcsr, Ptr);
+    Builder.CreateCall(ldmxcsr, Ptr);
     return true;
   }
   case IX86_BUILTIN_STMXCSR: {





More information about the llvm-commits mailing list