aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/ExecutionDepsFix.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-11-23 04:03:08 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-11-23 04:03:08 +0000
commit02845410f9d5fabb516054547a1a331bcbefd19b (patch)
tree4e9713c3f57c3052191769650b36b8e30a599729 /llvm/lib/CodeGen/ExecutionDepsFix.cpp
parent5d03d461277f6f45c010818f34c2e8b319c71d02 (diff)
downloadllvm-02845410f9d5fabb516054547a1a331bcbefd19b.zip
llvm-02845410f9d5fabb516054547a1a331bcbefd19b.tar.gz
llvm-02845410f9d5fabb516054547a1a331bcbefd19b.tar.bz2
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/CodeGen/ExecutionDepsFix.cpp')
-rw-r--r--llvm/lib/CodeGen/ExecutionDepsFix.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/ExecutionDepsFix.cpp b/llvm/lib/CodeGen/ExecutionDepsFix.cpp
index 16a8f92..300f037 100644
--- a/llvm/lib/CodeGen/ExecutionDepsFix.cpp
+++ b/llvm/lib/CodeGen/ExecutionDepsFix.cpp
@@ -600,6 +600,9 @@ void ExeDepsFix::visitSoftInstr(MachineInstr *mi, unsigned mask) {
while (!Regs.empty()) {
if (!dv) {
dv = Regs.pop_back_val().Value;
+ // Force the first dv to match the current instruction.
+ dv->AvailableDomains = dv->getCommonDomains(available);
+ assert(dv->AvailableDomains && "Domain should have been filtered");
continue;
}
@@ -617,9 +620,10 @@ void ExeDepsFix::visitSoftInstr(MachineInstr *mi, unsigned mask) {
}
// dv is the DomainValue we are going to use for this instruction.
- if (!dv)
+ if (!dv) {
dv = alloc();
- dv->AvailableDomains = available;
+ dv->AvailableDomains = available;
+ }
dv->Instrs.push_back(mi);
// Finally set all defs and non-collapsed uses to dv.