As pointed out in https://github.com/llvm/llvm-project/issues/54155#issuecomment-1057465479, there was a crash when loop info was being outlined. It was not being properly stripped and adjusted, so would point to the wrong location. This uses similar logic found in the CodeExtractor to adjust the loop debug info.
Details
Details
Diff Detail
Diff Detail
Unit Tests
Unit Tests
Event Timeline
llvm/test/Transforms/IROutliner/outlining-strip-loop-info.ll | ||
---|---|---|
14 | Is all the complexity needed in the test case? IIUC it would be sufficient to have a function with a simple outline-able loop + !llvm.loop metadata with debug info. |
Comment Actions
Just verified that this resolves the crash in the benchmark on my end.
I agree that this test case can be simplified. After that, I think this is good to go.
Comment Actions
This testcase is better, but there are still lots of instructions which aren't necessary.
How about this:
https://godbolt.org/z/r8Gq7vdbx
?
Is all the complexity needed in the test case? IIUC it would be sufficient to have a function with a simple outline-able loop + !llvm.loop metadata with debug info.