Skip to content

Commit 398d0b9

Browse files
committed
Fix MSVC constant truncation warnings. NFCI.
llvm-svn: 354731
1 parent e08f177 commit 398d0b9

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

llvm/lib/Target/X86/X86InstrInfo.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,17 +1465,17 @@ MachineInstr *X86InstrInfo::commuteInstructionImpl(MachineInstr &MI, bool NewMI,
14651465
int8_t Mask;
14661466
switch (MI.getOpcode()) {
14671467
default: llvm_unreachable("Unreachable!");
1468-
case X86::BLENDPDrri: Mask = 0x03; break;
1469-
case X86::BLENDPSrri: Mask = 0x0F; break;
1470-
case X86::PBLENDWrri: Mask = 0xFF; break;
1471-
case X86::VBLENDPDrri: Mask = 0x03; break;
1472-
case X86::VBLENDPSrri: Mask = 0x0F; break;
1473-
case X86::VBLENDPDYrri: Mask = 0x0F; break;
1474-
case X86::VBLENDPSYrri: Mask = 0xFF; break;
1475-
case X86::VPBLENDDrri: Mask = 0x0F; break;
1476-
case X86::VPBLENDWrri: Mask = 0xFF; break;
1477-
case X86::VPBLENDDYrri: Mask = 0xFF; break;
1478-
case X86::VPBLENDWYrri: Mask = 0xFF; break;
1468+
case X86::BLENDPDrri: Mask = (int8_t)0x03; break;
1469+
case X86::BLENDPSrri: Mask = (int8_t)0x0F; break;
1470+
case X86::PBLENDWrri: Mask = (int8_t)0xFF; break;
1471+
case X86::VBLENDPDrri: Mask = (int8_t)0x03; break;
1472+
case X86::VBLENDPSrri: Mask = (int8_t)0x0F; break;
1473+
case X86::VBLENDPDYrri: Mask = (int8_t)0x0F; break;
1474+
case X86::VBLENDPSYrri: Mask = (int8_t)0xFF; break;
1475+
case X86::VPBLENDDrri: Mask = (int8_t)0x0F; break;
1476+
case X86::VPBLENDWrri: Mask = (int8_t)0xFF; break;
1477+
case X86::VPBLENDDYrri: Mask = (int8_t)0xFF; break;
1478+
case X86::VPBLENDWYrri: Mask = (int8_t)0xFF; break;
14791479
}
14801480
// Only the least significant bits of Imm are used.
14811481
// Using int8_t to ensure it will be sign extended to the int64_t that

0 commit comments

Comments
 (0)