Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit e888613

Browse files
committed
[X86] Make some static arrays of opcodes const and shrink to uint16_t. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280649 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent bda8c85 commit e888613

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/Target/X86/X86FastISel.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,11 +1456,11 @@ bool X86FastISel::X86SelectCmp(const Instruction *I) {
14561456
}
14571457

14581458
// FCMP_OEQ and FCMP_UNE cannot be checked with a single instruction.
1459-
static unsigned SETFOpcTable[2][3] = {
1459+
static const uint16_t SETFOpcTable[2][3] = {
14601460
{ X86::SETEr, X86::SETNPr, X86::AND8rr },
14611461
{ X86::SETNEr, X86::SETPr, X86::OR8rr }
14621462
};
1463-
unsigned *SETFOpc = nullptr;
1463+
const uint16_t *SETFOpc = nullptr;
14641464
switch (Predicate) {
14651465
default: break;
14661466
case CmpInst::FCMP_OEQ: SETFOpc = &SETFOpcTable[0][0]; break;
@@ -1964,11 +1964,11 @@ bool X86FastISel::X86FastEmitCMoveSelect(MVT RetVT, const Instruction *I) {
19641964
CmpInst::Predicate Predicate = optimizeCmpPredicate(CI);
19651965

19661966
// FCMP_OEQ and FCMP_UNE cannot be checked with a single instruction.
1967-
static unsigned SETFOpcTable[2][3] = {
1967+
static const uint16_t SETFOpcTable[2][3] = {
19681968
{ X86::SETNPr, X86::SETEr , X86::TEST8rr },
19691969
{ X86::SETPr, X86::SETNEr, X86::OR8rr }
19701970
};
1971-
unsigned *SETFOpc = nullptr;
1971+
const uint16_t *SETFOpc = nullptr;
19721972
switch (Predicate) {
19731973
default: break;
19741974
case CmpInst::FCMP_OEQ:
@@ -2106,12 +2106,12 @@ bool X86FastISel::X86FastEmitSSESelect(MVT RetVT, const Instruction *I) {
21062106
std::swap(CmpLHS, CmpRHS);
21072107

21082108
// Choose the SSE instruction sequence based on data type (float or double).
2109-
static unsigned OpcTable[2][4] = {
2109+
static const uint16_t OpcTable[2][4] = {
21102110
{ X86::CMPSSrr, X86::FsANDPSrr, X86::FsANDNPSrr, X86::FsORPSrr },
21112111
{ X86::CMPSDrr, X86::FsANDPDrr, X86::FsANDNPDrr, X86::FsORPDrr }
21122112
};
21132113

2114-
unsigned *Opc = nullptr;
2114+
const uint16_t *Opc = nullptr;
21152115
switch (RetVT.SimpleTy) {
21162116
default: return false;
21172117
case MVT::f32: Opc = &OpcTable[0][0]; break;

0 commit comments

Comments
 (0)