Florian Hahn
2bdc1a1337
[LV] Use frozen start value for FindLastIV if needed. (#132691)
FindLastIV introduces multiple uses of the start value, where in the
original source there was only a single use, when the epilogue is
vectorized.
Each use of undef may produce a different result, so introducing
multiple uses can produce incorrect results when the input is
undef/poison.
If the start value may be undef or poison, freeze it and use the frozen
value, which will be the same at all uses.
See the following scenarios in Alive2:
* Both main and epilogue vector loops execute, go to exit block: https://alive2.llvm.org/ce/z/_TSvRr
* Both main and epilogue vector loops execute, go to scalar loop: https://alive2.llvm.org/ce/z/CsPj5v
* Only epilogue vector loop executes, go to exit block: https://alive2.llvm.org/ce/z/5XqkNV
* Only epilogue vector loop executes, go to scalar loop: https://alive2.llvm.org/ce/z/JUpqRN
The latter 2 show requiring freezing the resume phi. That means we cannot freeze
in the preheader. We could move the freeze to the main iteration count check, but
that would be a bit fragile to find and other transforms can sink the freeze if needed.
Depends on https://github.com/llvm/llvm-project/pull/132689
and https://github.com/llvm/llvm-project/pull/132690.
Fixes https://github.com/llvm/llvm-project/issues/126836
PR: https://github.com/llvm/llvm-project/pull/132691
2025-04-04 11:48:01 +01:00
..
2025-04-02 13:46:56 -07:00
2025-03-09 15:05:35 +00:00
2025-02-08 00:48:51 -08:00
2025-02-10 08:23:34 +00:00
2025-03-03 13:46:33 +07:00
2025-03-28 21:48:59 +00:00
2025-04-04 11:48:01 +01:00
2025-04-03 13:17:40 -07:00
2025-03-20 09:20:39 +01:00
2025-03-30 17:31:00 +01:00
2025-04-02 22:46:38 +01:00
2025-03-27 18:34:13 +00:00
2025-02-25 14:23:27 +00:00
2025-03-09 15:05:35 +00:00
2025-03-13 07:16:04 -07:00
2025-03-09 15:05:35 +00:00
2025-03-01 21:15:56 +00:00
2025-03-30 17:31:00 +01:00
2025-03-31 21:01:28 +01:00
2025-04-04 11:48:01 +01:00
2025-02-02 13:44:07 +00:00
2025-03-27 20:44:20 -07:00
2025-04-02 22:46:38 +01:00
2025-03-20 19:41:37 +00:00
2025-03-27 18:34:13 +00:00
2025-03-13 18:50:11 +00:00
2025-03-30 22:27:44 +01:00
2025-03-24 19:37:00 +00:00
2025-03-28 08:43:46 +00:00
2025-02-23 10:51:20 +00:00