michaelplatings marked 4 inline comments as done.
michaelplatings added inline comments.

================
Comment at: llvm/lib/IR/ConstantFold.cpp:1087
+          if (GVAlign == 0U && isa<Function>(GV))
+            GVAlign = 4U;
 
----------------
efriedma wrote:
> Using "4" as a default is dangerous; on x86, the alignment of the pointer 
> corresponds to the alignment of the function, but might be less than 4 if it 
> isn't explicitly specified.
I've put in a comment to say as much. Sadly I'm not in a position to change 
this behaviour without causing a code size regression.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D57335



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

Reply via email to