[PATCH] D37880: Fix an out-of-bounds shufflevector index bug

George Burgess IV via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 15 14:15:51 PDT 2017


george.burgess.iv added a comment.

Thanks for the comments!

> I propose following as the fix , Simon and other reviews can comment.

That'll probably fix the assertion, but I don't think it'll do what we want here. AFAICT, in that function, `VecIn1` contains elements [0..3] from the original vector, and `VecIn2` contains elements [4..7]. However, we're trying to shuffle out elements 0 and 8.

Hopefully the new test-case is more clear about this.



================
Comment at: test/CodeGen/ARM/crash-on-pow2-shufflevector.ll:19
+;
+
+%struct.desc = type { i32, [7 x i32] }
----------------
RKSimon wrote:
> javed.absar wrote:
> > Shouldn't this test have some sort of 'CHECK'? 
> Make the lit command something like:
> ```
> ; RUN: llc < %s -mtriple=armv7--linux-android | FileCheck %s
> ```
> You should then be able to use utils/update_llc_test_checks.py to create the CHECKS
> Shouldn't this test have some sort of 'CHECK'?

I didn't do checks because goal of this test was to get an assertion to fail. If we'd rather have checks here, I'm happy to do that, too. ¯\_(ツ)_/¯

> You should then be able to use utils/update_llc_test_checks.py to create the CHECKS

Thanks for the pointer! (Here and for bugpoint :) )


https://reviews.llvm.org/D37880





More information about the llvm-commits mailing list