[PATCH] D93397: [VectorCombine] loosen alignment constraint for load transform

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 08:50:21 PST 2020


spatel added inline comments.


================
Comment at: llvm/test/Transforms/VectorCombine/X86/load.ll:407
+; Pointer is not as aligned as load, but that's ok.
+; TODO: What does it mean when alignment attributes are in conflict?
 
----------------
lebedev.ri wrote:
> They are not really in conflict, just the first one being overly pessimistic.
> Since we know what the alignment must be on all execution paths,
> the alignment specified on the argument could be enhanced by knowledge backpropagation:
> https://godbolt.org/z/dvqEEb
Ah, thanks for the explanation. I was thinking of a gep case where the alignment could be over-specified, but that will be UB based on:
http://llvm.org/docs/LangRef.html#load-instruction
"Overestimating the alignment results in undefined behavior."


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

https://reviews.llvm.org/D93397



More information about the llvm-commits mailing list