]> granicus.if.org Git - clang/commitdiff
[X86] Fix operand order in the shuffle created for blend builtins.
authorCraig Topper <craig.topper@intel.com>
Mon, 11 Jun 2018 17:06:01 +0000 (17:06 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 11 Jun 2018 17:06:01 +0000 (17:06 +0000)
This was broken when the builtin was added in r334249.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334422 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGBuiltin.cpp

index 674cb487eef53108e029b6f2d0d3aba2436ff5d3..93258397945dd743c283fd7496f6697c3a3487f5 100644 (file)
@@ -9430,7 +9430,7 @@ Value *CodeGenFunction::EmitX86BuiltinExpr(unsigned BuiltinID,
     for (unsigned i = 0; i != NumElts; ++i)
       Indices[i] = ((Imm >> (i % 8)) & 0x1) ? NumElts + i : i;
 
-    return Builder.CreateShuffleVector(Ops[1], Ops[0],
+    return Builder.CreateShuffleVector(Ops[0], Ops[1],
                                        makeArrayRef(Indices, NumElts),
                                        "blend");
   }