jyknight added a comment.

Also, I note the doc says it's useful for `for “load address” and “push 
address” instructions` (note, "load address" means e.g. x86 "lea" instruction) 
-- which should NOT be dependent upon the value stored in the memory. The x86 
backend actually uses a "Ts" constraint for `*lea<mode>` which is defined by 
`define_address_constraint`, documented 
<https://gcc.gnu.org/onlinedocs/gccint/Define-Constraints.html> as making a 
constraint that is basically equivalent to p (just with different limits as to 
what kinds of addresses are accepted.)

"p" and other define_address_constraints are also used a lot for "prefetch" 
kinds of instructions, which also should not be memory-value-dependent.

So, at least per that description, and usage within GCC, I think LLVM's 
previous behavior of allowing it to move past a store to the same address 
actually seems correct?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145416/new/

https://reviews.llvm.org/D145416

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to