diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-02-23 18:49:02 +0000 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-02-23 18:49:02 +0000 |
| commit | 398d0b9e96ab46b5327557455eecde3a33764237 (patch) | |
| tree | c953f3783624a729b821f2a1d7072eaa552464cc /llvm/lib/Target | |
| parent | e08f177ea2cf576e5d619db688ea30ea6937f6ef (diff) | |
| download | bcm5719-llvm-398d0b9e96ab46b5327557455eecde3a33764237.tar.gz bcm5719-llvm-398d0b9e96ab46b5327557455eecde3a33764237.zip | |
Fix MSVC constant truncation warnings. NFCI.
llvm-svn: 354731
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index 64721c06270..dd214ded439 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/lib/Target/X86/X86InstrInfo.cpp @@ -1465,17 +1465,17 @@ MachineInstr *X86InstrInfo::commuteInstructionImpl(MachineInstr &MI, bool NewMI, int8_t Mask; switch (MI.getOpcode()) { default: llvm_unreachable("Unreachable!"); - case X86::BLENDPDrri: Mask = 0x03; break; - case X86::BLENDPSrri: Mask = 0x0F; break; - case X86::PBLENDWrri: Mask = 0xFF; break; - case X86::VBLENDPDrri: Mask = 0x03; break; - case X86::VBLENDPSrri: Mask = 0x0F; break; - case X86::VBLENDPDYrri: Mask = 0x0F; break; - case X86::VBLENDPSYrri: Mask = 0xFF; break; - case X86::VPBLENDDrri: Mask = 0x0F; break; - case X86::VPBLENDWrri: Mask = 0xFF; break; - case X86::VPBLENDDYrri: Mask = 0xFF; break; - case X86::VPBLENDWYrri: Mask = 0xFF; break; + case X86::BLENDPDrri: Mask = (int8_t)0x03; break; + case X86::BLENDPSrri: Mask = (int8_t)0x0F; break; + case X86::PBLENDWrri: Mask = (int8_t)0xFF; break; + case X86::VBLENDPDrri: Mask = (int8_t)0x03; break; + case X86::VBLENDPSrri: Mask = (int8_t)0x0F; break; + case X86::VBLENDPDYrri: Mask = (int8_t)0x0F; break; + case X86::VBLENDPSYrri: Mask = (int8_t)0xFF; break; + case X86::VPBLENDDrri: Mask = (int8_t)0x0F; break; + case X86::VPBLENDWrri: Mask = (int8_t)0xFF; break; + case X86::VPBLENDDYrri: Mask = (int8_t)0xFF; break; + case X86::VPBLENDWYrri: Mask = (int8_t)0xFF; break; } // Only the least significant bits of Imm are used. // Using int8_t to ensure it will be sign extended to the int64_t that |

