[llvm-dev] Question about store with unaligned memory address
Krzysztof Parzyszek via llvm-dev
llvm-dev at lists.llvm.org
Fri Jan 29 10:11:38 PST 2016
On 1/29/2016 10:47 AM, JinGu Kang via llvm-dev wrote:
>
> I am doing it with lowering store as follow:
>
> 1. make low and high address with alignment.
> 2. load 2 words from low and high address.
> 3. manipulate them with values to store according to alignment.
> 4. store 2 words modified to low and high address
Sounds ok.
> In order to keep the order between loads and stores, I have used chain and
> glue on the DAG but some passes have mixed it in machine instruction level.
Glue isn't necessary, chains are sufficient.
I'm not sure what pass reordered dependent loads and stores, but that
sounds bad. What matters in cases like this are the MachineMemOperands.
If there isn't any on a load/store instruction, it should be treated
conservatively (i.e. alias everything else), if there is one, it'd
better be correct. Wrong MMO could certainly lead to such behavior.
-Krzysztof
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
More information about the llvm-dev
mailing list