When loop condition isn't immediately in the form supported by invariant injection
unswitching, try to canonicalize it to this form.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
The patch itself seems straightforward. LGTM.
llvm/test/Transforms/SimpleLoopUnswitch/inject-invariant-conditions.ll | ||
---|---|---|
375–389 | This seems unlikely profitable... Why not max from -2147483648 and [[LEN]]? Or do I miss anything? |
llvm/test/Transforms/SimpleLoopUnswitch/inject-invariant-conditions.ll | ||
---|---|---|
375–389 | min I meant. |
llvm/test/Transforms/SimpleLoopUnswitch/inject-invariant-conditions.ll | ||
---|---|---|
375–389 | It's just a confusing name, I'll rename it. In fact, it is profitable when len <s 0. If you look at test_04 which is the aim of this whole thing, it should make it more clear. |
This seems unlikely profitable... Why not max from -2147483648 and [[LEN]]?
Or do I miss anything?