From 1d3f4aefd69a12ede86af6ee430cc01bce97c14b Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 2 Mar 2016 07:32:45 +0000 Subject: [PATCH] [X86] Remove unnecessary call to isReg from emitter's DestMem handling for VEX prefix. The operand is always a register. NFC llvm-svn: 262468 --- .../lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp index 30306e96426e..5387bba3e59f 100644 --- a/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp +++ b/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp @@ -739,13 +739,11 @@ void X86MCCodeEmitter::EmitVEXOpcodePrefix(uint64_t TSFlags, unsigned &CurByte, CurOp++; } - const MCOperand &MO = MI.getOperand(CurOp); - if (MO.isReg()) { - if (X86II::isX86_64ExtendedReg(MO.getReg())) - VEX_R = 0x0; - if (X86II::is32ExtendedReg(MO.getReg())) - EVEX_R2 = 0x0; - } + if (X86II::isX86_64ExtendedReg(MI.getOperand(CurOp).getReg())) + VEX_R = 0x0; + if (X86II::is32ExtendedReg(MI.getOperand(CurOp).getReg())) + EVEX_R2 = 0x0; + CurOp++; break; } case X86II::MRMSrcMem: