[PATCH] D115955: [SLP]Alternate vectorization for cmp instructions.

Steven Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 1 18:46:55 PST 2022


srj added a comment.

In D115955#3289249 <https://reviews.llvm.org/D115955#3289249>, @cmtice wrote:

> We're still working on getting you a reproducible test case, but this is definitely causing some bad codegen for us. Could you please revert it while we work on getting you the test case?

I don't have a reproducible test case yet, but comparing IR before and after the change, I **think** what is happening is that we originally had a comparison like `icmp slt i64 %VALUE, 2147483648`; after this change, this gets combined into a vectorized cmp but (apparently) with the condition reversed: `icmp sgt <4 x i64> %1057, <i64 2147483647, i64 2147483647, i64 2147483647, i64 2147483648>`, where `%VALUE` is in the last slot of the vector, thus giving us effectively a  `sgt` comparison where we should have `slt`.

(Needless to say, this causes amusing failures, with error messages like `Error: Product of extents for buffer is 16384, which exceeds the maximum size of 2147483647`...)

Anyway, I don't think I can narrow this to an easily encapsulated repro case to give you tonight, but in the meantime, perhaps the nature of the apparent failure mode may help track down the issue?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115955/new/

https://reviews.llvm.org/D115955



More information about the llvm-commits mailing list