[llvm-branch-commits] [llvm] [InstCombine][asan] Don't speculate loads before `select ptr` (PR #100773)

Vitaly Buka via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jul 26 12:04:22 PDT 2024


================
@@ -1042,8 +1042,8 @@ Instruction *InstCombinerImpl::visitLoadInst(LoadInst &LI) {
   }
 
   // None of the following transforms are legal for volatile/ordered atomic
-  // loads.  Most of them do apply for unordered atomics.
-  if (!LI.isUnordered()) return nullptr;
+  // loads and sanitizers.  Most of them do apply for unordered atomics.
+  if (mustSuppressSpeculation(LI)) return nullptr;
----------------
vitalybuka wrote:

Done.

https://github.com/llvm/llvm-project/pull/100773


More information about the llvm-branch-commits mailing list