[LV] Do not check widening decision for instrs outside of loop.
authorFlorian Hahn <flo@fhahn.com>
Mon, 3 Aug 2020 08:47:16 +0000 (09:47 +0100)
committerFlorian Hahn <flo@fhahn.com>
Mon, 3 Aug 2020 09:09:24 +0000 (10:09 +0100)
commit98db27711d86d4085db4a4a8ff68f8baa1b094ef
tree9f2af4fb41915a83d64d973a6e05a12b6ae184f1
parent35b65be041127db9fe23d3128a004c888893cbae
[LV] Do not check widening decision for instrs outside of loop.

No widening decisions will be computed for instructions outside the
loop. Do not try to get a widening decision. The load/store will be just
a scalar load, so treating at as normal should be fine I think.

Fixes PR46950.

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D85087
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/AArch64/pr46950-load-cast-context-crash.ll [new file with mode: 0644]