https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112598
--- Comment #17 from Li Pan <pan2.li at intel dot com> --- (In reply to Robin Dapp from comment #15) > Does the =m fix your issue? Or is the code gen different then and we're > just lucky? For my problem it doesn't help because we still don't recognize > an alias between load and store and the load is moved. > > Richi's RFC patch from a while ago helps, though. I cc'd you. No, it should be something that happens to work. I double-checked the asm layout, the alias is still false between scalar load and vector store. 1016e: 158000ef jal 102c6 <memset> 10172: ffc50793 add a5,a0,-4 10176: 4689 li a3,2 10178: 0d047057 vsetvli zero,s0,e32,m1,ta,ma 1017c: 40d8 lw a4,4(s1) <= LOAD 1017e: 5e00b0d7 vmv.v.i v1,1 10182: 74d1a423 sw a3,1864(gp) # 13398 <a> 10186: 0207e0a7 vse32.v v1,(a5) <= STORE 1018a: 03271163 bne a4,s2,101ac <main+0x6e>