[PATCH] D131716: X86: Don't fold TEST into ADD ... at GOTTPOFF/GOTNTPOFF/INDNTPOFF

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 11 14:04:02 PDT 2022


MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

> This causes miscompiles with ubsan after bacdf80f42b46044262e97e98398d1bd0b75900d <https://reviews.llvm.org/rGbacdf80f42b46044262e97e98398d1bd0b75900d>

ubsan can be more specific, `-fsanitize=null`



================
Comment at: llvm/lib/Target/X86/X86InstrInfo.cpp:4085
 
+  // "ELF Handling for Thread-Local Storage" specifies that x86-64 GOTTPOFF, and
+  // i386 GOTNTPOFF/INDNTPOFF relocations can convert an ADD to a LEA during
----------------
x86-64 psABI should be more authoritative than ""ELF Handling for Thread-Local Storage"".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131716



More information about the llvm-commits mailing list