From 2583b0631043d3f777fbb2dfd9a81b7188118d2d Mon Sep 17 00:00:00 2001 From: Hal Finkel Date: Fri, 28 Mar 2014 20:24:55 +0000 Subject: [PATCH] [PowerPC] Fix VSX permutation isel Not only did I invert the indices when I wrote the code, but I also did the same thing when I wrote the regression test. Oops. llvm-svn: 205046 --- llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 2 +- llvm/test/CodeGen/PowerPC/vsx.ll | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp index b8a042503d2e..3bbc8397c924 100644 --- a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp @@ -1351,7 +1351,7 @@ SDNode *PPCDAGToDAGISel::Select(SDNode *N) { else DM[i] = 1; - SDValue DMV = CurDAG->getTargetConstant(DM[0] | (DM[1] << 1), MVT::i32); + SDValue DMV = CurDAG->getTargetConstant(DM[1] | (DM[0] << 1), MVT::i32); if (Op1 == Op2 && DM[0] == 0 && DM[1] == 0 && Op1.getOpcode() == ISD::SCALAR_TO_VECTOR && diff --git a/llvm/test/CodeGen/PowerPC/vsx.ll b/llvm/test/CodeGen/PowerPC/vsx.ll index 4f4f816d7237..ec10bc683b01 100644 --- a/llvm/test/CodeGen/PowerPC/vsx.ll +++ b/llvm/test/CodeGen/PowerPC/vsx.ll @@ -465,7 +465,7 @@ define <2 x double> @test54(<2 x double> %a, <2 x double> %b) { ret <2 x double> %v ; CHECK-LABEL: @test54 -; CHECK: xxpermdi 34, 34, 35, 1 +; CHECK: xxpermdi 34, 34, 35, 2 ; CHECK: blr }