I have fixed one issue in AArch64LoadStoreOptimizer.cpp file.
e.g: have two instructions like below
add x8, x9,x8, lsl #2
ldr w1, [x8]
and I have merged these two instructions into one instruction like below, and I am deleting add instruction if don’t have any uses.
ldr w1, [x9,x8, lsl #2]
But some llvm-test-sute tests are failing because getting difference in assembly code generation. I did bisecting with object files to find the issue.
In one failing test z12.c file, if I generate z12.o using z12.s of z12.c file it’s working.
but if I generate direct z12.o using z12.c file and it’s not working.
so I did disassemble the both z12.o files and I have observed below differences in one ldr instruction(above merged ldr instruction).
F38: b869eb61 ldr w1, [x9, x8, sxtx] ( disassemble code of z12.o generated using z12.c).
F38: b8697b61 ldr w1, [x9, x8, lsl #2] ( disassemble code of z12.o generated using z12.s).
I am getting above two differences, because of these differences test is failing.
Could any one please give your suggestions to fix this problem.
Thanks & Regards,