[llvm-commits] [llvm-gcc-4.0] r42084 - /llvm-gcc-4.0/branches/release_21/gcc/config/i386/llvm-i386.cpp

Tanya Lattner tonic at nondot.org
Mon Sep 17 23:15:06 PDT 2007


Author: tbrethou
Date: Tue Sep 18 01:15:05 2007
New Revision: 42084

URL: http://llvm.org/viewvc/llvm-project?rev=42084&view=rev
Log:
Merge from mainline.

Modified:
    llvm-gcc-4.0/branches/release_21/gcc/config/i386/llvm-i386.cpp

Modified: llvm-gcc-4.0/branches/release_21/gcc/config/i386/llvm-i386.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/branches/release_21/gcc/config/i386/llvm-i386.cpp?rev=42084&r1=42083&r2=42084&view=diff

==============================================================================
--- llvm-gcc-4.0/branches/release_21/gcc/config/i386/llvm-i386.cpp (original)
+++ llvm-gcc-4.0/branches/release_21/gcc/config/i386/llvm-i386.cpp Tue Sep 18 01:15:05 2007
@@ -433,9 +433,15 @@
     Result = BuildVector(Ops[0], Ops[1], NULL);
     return true;
   case IX86_BUILTIN_VEC_INIT_V4HI:
+    // Sometimes G++ promotes arguments to int.
+    for (unsigned i = 0; i != 4; ++i)
+      Ops[i] = Builder.CreateIntCast(Ops[i], Type::Int16Ty, false, "tmp");
     Result = BuildVector(Ops[0], Ops[1], Ops[2], Ops[3], NULL);
     return true;
   case IX86_BUILTIN_VEC_INIT_V8QI:
+    // Sometimes G++ promotes arguments to int.
+    for (unsigned i = 0; i != 8; ++i)
+      Ops[i] = Builder.CreateIntCast(Ops[i], Type::Int8Ty, false, "tmp");
     Result = BuildVector(Ops[0], Ops[1], Ops[2], Ops[3],
                          Ops[4], Ops[5], Ops[6], Ops[7], NULL);
     return true;





More information about the llvm-commits mailing list