Open JonPsson opened 5 years ago
OK, I think I know how to fix this, I'll submit a patch soon. Any chance you can reduce this a bit? The testcase is 2000 lines, but I guess only a small subset of them is needed.
I can only suggest that you try
bin/opt -strip -metarenamer -debugify
...
I did reduce it from the benchmark, but I may have missed using -debugify as well. Just need to make sure to not loose the llvm.dbg instruction...
OK, I think I know how to fix this, I'll submit a patch soon. Any chance you can reduce this a bit? The testcase is 2000 lines, but I guess only a small subset of them is needed.
bb5: ; preds = %bb br label %bb6
This is why it's failing.
200 // If a block has only one instruction, then that is a terminator 201 // instruction so that the block does nothing. This does happen. 202 if (Succ1.size() == 1) // equivalent to if-then -> 203 return considerHoistingFromTo(Succ0, B);
So, just to understand, this is the thing not hoisted.
bb3: ; preds = %bb %tmp4 = fdiv double 1.000000e+00, %tmp, !dbg !1200
yes, exactly...
So, just to understand, this is the thing not hoisted.
bb3: ; preds = %bb %tmp4 = fdiv double 1.000000e+00, %tmp, !dbg !1200
Extended Description
Without the @llvm.dbg instruction in the test case, the fdiv instruction is moved up in the CFG by
bin/opt -mtriple=systemz-unknown -mcpu=z13 -S tc_speculexe.ll -speculative-execution
I suspect that this is also (as in bug 40564) related to counting instructions in the block on the line
in SpeculativeExecution.cpp