[ARM] Fix crash for gather of pointer costs.
authorDavid Green <david.green@arm.com>
Sat, 31 Oct 2020 13:10:14 +0000 (13:10 +0000)
committerDavid Green <david.green@arm.com>
Sat, 31 Oct 2020 13:10:14 +0000 (13:10 +0000)
commit30ad7426442e6f029419366de8fe56eae529c00c
treee2e4cf1b25fe7846f8ffebc285f54455804d1ce5
parent5963e028e7145d68b70be128d13e26a02095a0ad
[ARM] Fix crash for gather of pointer costs.

If the elt size is unknown due to it being a pointer, a comparison
against 0 will cause an assert. Make sure the elt size is large enough
before comparing and for the moment just return the scalar cost.
llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
llvm/test/Analysis/CostModel/ARM/mve-gather-scatter-cost.ll