In the function canFoldInAddressingMode, VT is computed as the type of the destination/source of a LOAD/STORE operations, instead of the memory type of the operation.
On targets with a scaling factor on the offset of the LOAD/STORE operations, the function may return false for actually valid cases. This may then prevent the selection of profitable pre or post indexed load/store operations, and instead select pre or post indexed load/store for unprofitable cases.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Hi François,
Any chance you can add a test case for this change?
I reckon that may be difficult, but if you can come up with something that would be great!
Thanks,
-Quentin
Comment Actions
Hi Quentin,
I compiled a number of benches with an LLVM/arm compiler, and looked for differences in code generation with/without this patch, with no success. I also failed to reproduce it on a dedicated test case.I did not try on other targets
Thus, sorry, I won't be able to provide you with a test case for this patch.
-François.
Comment Actions
Thanks for trying François.
LGTM then.
I'll commit on your behalf, shortly.
Cheers,
-Quentin