summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/XCore
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-10-31 23:19:46 +0000
committerReid Kleckner <reid@kleckner.net>2014-10-31 23:19:46 +0000
commitda00cf5f73446235f0bfe89db90c28fc2d2019f3 (patch)
tree47c94cdf8b83ea86908fbd10a72b87295d58e00c /llvm/lib/Target/XCore
parent75bd66e51d2d4ae485034508aae85e297def8e2e (diff)
downloadbcm5719-llvm-da00cf5f73446235f0bfe89db90c28fc2d2019f3.tar.gz
bcm5719-llvm-da00cf5f73446235f0bfe89db90c28fc2d2019f3.zip
Work around bugs in MSVC "14" CTP 3's conversion logic
It appears to ignore or find ambiguous MachineInstrBuilder's conversion operators that allow conversion to MachineInstr* and MachineBasicBlock::bundle_iterator. As a workaround, add an explicit way to get the MachineInstr. llvm-svn: 221017
Diffstat (limited to 'llvm/lib/Target/XCore')
-rw-r--r--llvm/lib/Target/XCore/XCoreInstrInfo.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Target/XCore/XCoreInstrInfo.cpp b/llvm/lib/Target/XCore/XCoreInstrInfo.cpp
index 36ea9a087da..c310aa3a179 100644
--- a/llvm/lib/Target/XCore/XCoreInstrInfo.cpp
+++ b/llvm/lib/Target/XCore/XCoreInstrInfo.cpp
@@ -446,16 +446,19 @@ MachineBasicBlock::iterator XCoreInstrInfo::loadImmediate(
dl = MI->getDebugLoc();
if (isImmMskBitp(Value)) {
int N = Log2_32(Value) + 1;
- return BuildMI(MBB, MI, dl, get(XCore::MKMSK_rus), Reg).addImm(N);
+ return BuildMI(MBB, MI, dl, get(XCore::MKMSK_rus), Reg)
+ .addImm(N)
+ .getInstr();
}
if (isImmU16(Value)) {
int Opcode = isImmU6(Value) ? XCore::LDC_ru6 : XCore::LDC_lru6;
- return BuildMI(MBB, MI, dl, get(Opcode), Reg).addImm(Value);
+ return BuildMI(MBB, MI, dl, get(Opcode), Reg).addImm(Value).getInstr();
}
MachineConstantPool *ConstantPool = MBB.getParent()->getConstantPool();
const Constant *C = ConstantInt::get(
Type::getInt32Ty(MBB.getParent()->getFunction()->getContext()), Value);
unsigned Idx = ConstantPool->getConstantPoolIndex(C, 4);
return BuildMI(MBB, MI, dl, get(XCore::LDWCP_lru6), Reg)
- .addConstantPoolIndex(Idx);
+ .addConstantPoolIndex(Idx)
+ .getInstr();
}
OpenPOWER on IntegriCloud