Hi Richard, David,
In principle yes. Note that it changes the behavior of -O2 -ftree-vectorize as -ftree-vectorize does not imply changing the default cost model. I am fine with that, but eventually this will have some testsuite fallout.
Indeed I am observing a regression with this patch on arm-none-eabi in gcc.dg/tree-ssa/gen-vect-26.c.
Seems that the cheap vectoriser model doesn't do unaligned stores (as expected I think?). Is adding -fvect-cost-model=dynamic to the test options the correct approach?
Thanks, Kyrill