- There is an outer while-loop and an inner for-loop in the test case. Inner-loop has llvm.loop.unroll.enable metadata that is not preserved. This happens around [1], when the loop metadata of outer loop overrides the inner loop metadata directly, without looking at whether inner-loop itself has loop metadata.
[1] https://github.com/llvm/llvm-project/blob/ab755e65629ea098cb6faa77b13ac087849ffc67/llvm/lib/Transforms/Utils/Local.cpp#L1146
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/Transforms/SimplifyCFG/preserve-llvm-loop-metadata.ll | ||
---|---|---|
1–2 | is this related change? |
resolved comment.
llvm/test/Transforms/SimplifyCFG/preserve-llvm-loop-metadata.ll | ||
---|---|---|
1–2 | This was added since 'test2' used opaque pointers. The context is that, even if 'opt' tool uses opaque pointers by default, " opaque pointer mode is automatically disabled for IR and bitcode files that explicitly mention i8* style typed pointers." (from https://llvm.org/docs/OpaquePointers.html#opaque-pointers-mode) Updated new tests to use i32* (and -opaque-pointer is not required), and will send out a separate patch to clean up this test case. |
is this related change?