Broken vectorized loop boundary (original) (raw)
December 21, 2023, 12:23pm 1
Hi! We’ve got a weird case of a broken loop boundary. Unfortunately, we don’t have a reproducer yet, just a generated assembly.
The pattern is very simple: there is a vectorized body of memcopy, with an exit-value counted as N - (N % Step). But! For some inexplicable reason the exit-value was replaced by a magic ‘0x1fffffece0’ value.
The remaining loop structure constructed by the Vectorizer looks good: tail loop and scalar loop have a correct exit-value. So apparently the poisonous instruction appeared with either a Vectorizer or some loop optimization in the backend.
I completely understand that without a reproducer it’s probably impossible to guess which pass is guilty. However, does anyone know of any similar bugs? Or can suggest a possible spot where the bug might have come from?