[llvm-commits] [llvm] r159500 - /llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
Craig Topper
craig.topper at gmail.com
Sat Jun 30 19:05:52 PDT 2012
Author: ctopper
Date: Sat Jun 30 21:05:52 2012
New Revision: 159500
URL: http://llvm.org/viewvc/llvm-project?rev=159500&view=rev
Log:
Use a second switch statement to reduce number of calls to SelectGather in code. Reduces code size a bit.
Modified:
llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=159500&r1=159499&r2=159500&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Sat Jun 30 21:05:52 2012
@@ -1996,37 +1996,43 @@
switch (IntNo) {
default: break;
case Intrinsic::x86_avx2_gather_d_pd:
- return SelectGather(Node, X86::VGATHERDPDrm);
case Intrinsic::x86_avx2_gather_d_pd_256:
- return SelectGather(Node, X86::VGATHERDPDYrm);
case Intrinsic::x86_avx2_gather_q_pd:
- return SelectGather(Node, X86::VGATHERQPDrm);
case Intrinsic::x86_avx2_gather_q_pd_256:
- return SelectGather(Node, X86::VGATHERQPDYrm);
case Intrinsic::x86_avx2_gather_d_ps:
- return SelectGather(Node, X86::VGATHERDPSrm);
case Intrinsic::x86_avx2_gather_d_ps_256:
- return SelectGather(Node, X86::VGATHERDPSYrm);
case Intrinsic::x86_avx2_gather_q_ps:
- return SelectGather(Node, X86::VGATHERQPSrm);
case Intrinsic::x86_avx2_gather_q_ps_256:
- return SelectGather(Node, X86::VGATHERQPSYrm);
case Intrinsic::x86_avx2_gather_d_q:
- return SelectGather(Node, X86::VPGATHERDQrm);
case Intrinsic::x86_avx2_gather_d_q_256:
- return SelectGather(Node, X86::VPGATHERDQYrm);
case Intrinsic::x86_avx2_gather_q_q:
- return SelectGather(Node, X86::VPGATHERQQrm);
case Intrinsic::x86_avx2_gather_q_q_256:
- return SelectGather(Node, X86::VPGATHERQQYrm);
case Intrinsic::x86_avx2_gather_d_d:
- return SelectGather(Node, X86::VPGATHERDDrm);
case Intrinsic::x86_avx2_gather_d_d_256:
- return SelectGather(Node, X86::VPGATHERDDYrm);
case Intrinsic::x86_avx2_gather_q_d:
- return SelectGather(Node, X86::VPGATHERQDrm);
- case Intrinsic::x86_avx2_gather_q_d_256:
- return SelectGather(Node, X86::VPGATHERQDYrm);
+ case Intrinsic::x86_avx2_gather_q_d_256: {
+ unsigned Opc;
+ switch (IntNo) {
+ default: llvm_unreachable("Impossible intrinsic.");
+ case Intrinsic::x86_avx2_gather_d_pd: Opc = X86::VGATHERDPDrm; break;
+ case Intrinsic::x86_avx2_gather_d_pd_256: Opc = X86::VGATHERDPDYrm; break;
+ case Intrinsic::x86_avx2_gather_q_pd: Opc = X86::VGATHERQPDrm; break;
+ case Intrinsic::x86_avx2_gather_q_pd_256: Opc = X86::VGATHERQPDYrm; break;
+ case Intrinsic::x86_avx2_gather_d_ps: Opc = X86::VGATHERDPSrm; break;
+ case Intrinsic::x86_avx2_gather_d_ps_256: Opc = X86::VGATHERDPSYrm; break;
+ case Intrinsic::x86_avx2_gather_q_ps: Opc = X86::VGATHERQPSrm; break;
+ case Intrinsic::x86_avx2_gather_q_ps_256: Opc = X86::VGATHERQPSYrm; break;
+ case Intrinsic::x86_avx2_gather_d_q: Opc = X86::VPGATHERDQrm; break;
+ case Intrinsic::x86_avx2_gather_d_q_256: Opc = X86::VPGATHERDQYrm; break;
+ case Intrinsic::x86_avx2_gather_q_q: Opc = X86::VPGATHERQQrm; break;
+ case Intrinsic::x86_avx2_gather_q_q_256: Opc = X86::VPGATHERQQYrm; break;
+ case Intrinsic::x86_avx2_gather_d_d: Opc = X86::VPGATHERDDrm; break;
+ case Intrinsic::x86_avx2_gather_d_d_256: Opc = X86::VPGATHERDDYrm; break;
+ case Intrinsic::x86_avx2_gather_q_d: Opc = X86::VPGATHERQDrm; break;
+ case Intrinsic::x86_avx2_gather_q_d_256: Opc = X86::VPGATHERQDYrm; break;
+ }
+ return SelectGather(Node, Opc);
+ }
}
break;
}
More information about the llvm-commits
mailing list