diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-11-23 04:03:08 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-11-23 04:03:08 +0000 |
| commit | 02845410f9d5fabb516054547a1a331bcbefd19b (patch) | |
| tree | 4e9713c3f57c3052191769650b36b8e30a599729 /llvm/lib/Target/X86 | |
| parent | 5d03d461277f6f45c010818f34c2e8b319c71d02 (diff) | |
| download | bcm5719-llvm-02845410f9d5fabb516054547a1a331bcbefd19b.tar.gz bcm5719-llvm-02845410f9d5fabb516054547a1a331bcbefd19b.zip | |
Fix PR11422.
This was a bug in keeping track of the available domains when merging
domain values.
The wrong domain mask caused ExecutionDepsFix to try to move VANDPSYrr
to the integer domain which is only available in AVX2.
Also add an assertion to catch future attempts at emitting AVX2
instructions.
llvm-svn: 145096
Diffstat (limited to 'llvm/lib/Target/X86')
| -rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index 4f5b757acd2..24c4a53792d 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/lib/Target/X86/X86InstrInfo.cpp @@ -3606,8 +3606,11 @@ void X86InstrInfo::setExecutionDomain(MachineInstr *MI, unsigned Domain) const { uint16_t dom = (MI->getDesc().TSFlags >> X86II::SSEDomainShift) & 3; assert(dom && "Not an SSE instruction"); const unsigned *table = lookup(MI->getOpcode(), dom); - if (!table) // try the other table + if (!table) { // try the other table + assert((TM.getSubtarget<X86Subtarget>().hasAVX2() || Domain < 3) && + "256-bit vector operations only available in AVX2"); table = lookupAVX2(MI->getOpcode(), dom); + } assert(table && "Cannot change domain"); MI->setDesc(get(table[Domain-1])); } |

