From 7d1a0d4e3ebf058a8b1d0dea9b6119444ed041c8 Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Sat, 29 Jun 2013 19:32:29 +0000 Subject: [PATCH] R600: Bank Swizzle now display SCL equivalent git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185267 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp | 6 +++--- lib/Target/R600/R600InstrInfo.cpp | 8 ++++---- lib/Target/R600/R600InstrInfo.h | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp b/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp index 8c814e057a6..fac3c3963b4 100644 --- a/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp +++ b/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp @@ -178,13 +178,13 @@ void AMDGPUInstPrinter::printBankSwizzle(const MCInst *MI, unsigned OpNo, int BankSwizzle = MI->getOperand(OpNo).getImm(); switch (BankSwizzle) { case 1: - O << "BS:VEC_021"; + O << "BS:VEC_021/SCL_122"; break; case 2: - O << "BS:VEC_120"; + O << "BS:VEC_120/SCL_212"; break; case 3: - O << "BS:VEC_102"; + O << "BS:VEC_102/SCL_221"; break; case 4: O << "BS:VEC_201"; diff --git a/lib/Target/R600/R600InstrInfo.cpp b/lib/Target/R600/R600InstrInfo.cpp index f05390ec48c..354f039c1e8 100644 --- a/lib/Target/R600/R600InstrInfo.cpp +++ b/lib/Target/R600/R600InstrInfo.cpp @@ -282,15 +282,15 @@ static std::vector > Swizzle(std::vector > Src, R600InstrInfo::BankSwizzle Swz) { switch (Swz) { - case R600InstrInfo::ALU_VEC_012: + case R600InstrInfo::ALU_VEC_012_SCL_210: break; - case R600InstrInfo::ALU_VEC_021: + case R600InstrInfo::ALU_VEC_021_SCL_122: std::swap(Src[1], Src[2]); break; - case R600InstrInfo::ALU_VEC_102: + case R600InstrInfo::ALU_VEC_102_SCL_221: std::swap(Src[0], Src[1]); break; - case R600InstrInfo::ALU_VEC_120: + case R600InstrInfo::ALU_VEC_120_SCL_212: std::swap(Src[0], Src[1]); std::swap(Src[0], Src[2]); break; diff --git a/lib/Target/R600/R600InstrInfo.h b/lib/Target/R600/R600InstrInfo.h index a3752889369..a6add8382cf 100644 --- a/lib/Target/R600/R600InstrInfo.h +++ b/lib/Target/R600/R600InstrInfo.h @@ -36,14 +36,14 @@ namespace llvm { int getBranchInstr(const MachineOperand &op) const; std::vector > - ExtractSrcs(MachineInstr *MI, const DenseMap &PV) const; + ExtractSrcs(MachineInstr *MI, const DenseMap &PV, unsigned &ConstCount) const; public: enum BankSwizzle { - ALU_VEC_012 = 0, - ALU_VEC_021, - ALU_VEC_120, - ALU_VEC_102, + ALU_VEC_012_SCL_210 = 0, + ALU_VEC_021_SCL_122, + ALU_VEC_120_SCL_212, + ALU_VEC_102_SCL_221, ALU_VEC_201, ALU_VEC_210 };