[MachineInstrBuilder] Support for adding a ConstantPoolIndex MO with an additional...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 21 Nov 2015 21:42:26 +0000 (21:42 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 21 Nov 2015 21:42:26 +0000 (21:42 +0000)
commitef8457f79e529990594d5c7feaf9e871fbc4b38e
tree50746dcd6504244f1cd5e7e7118d80811970e317
parentbf390b05bc5c3674520ae480af69d1a935a06f2b
[MachineInstrBuilder] Support for adding a ConstantPoolIndex MO with an additional offset.

MachineInstrBuilder::addDisp can already add an immediate or global address MO with an adjusted offset, this patch adds support for constant pool indices as well.

All remaining MO types still assert - there are a number of other types that could support adjusted offsets but I have no test cases at this time.

Required to fix a regression in D13988 found by Mikael Holmén during stress testing (test case attached).

Differential Revision: http://reviews.llvm.org/D14867

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253795 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineInstrBuilder.h
test/CodeGen/X86/insertps-from-constantpool.ll [new file with mode: 0644]