https://github.com/jinhuang1102 updated https://github.com/llvm/llvm-project/pull/195015
>From 241c898f62ae431f01e6b4b9f8fc9d6b0cad62d0 Mon Sep 17 00:00:00 2001 From: Aiden Grossman <[email protected]> Date: Sun, 24 May 2026 13:51:22 -0700 Subject: [PATCH] [Clang][Driver] Reenable test on UBSan/HWAsan (#199448) It passes locally, presumably due to 15488a7f78ce7b9ae3c06b031134e5cb339b335c fixing the behavior here. --- clang/test/Driver/crash-ir-repro.cpp | 5 ---- llvm/lib/Analysis/AliasAnalysis.cpp | 6 ++--- .../DeadStoreElimination/atomic-todo.ll | 23 ------------------- 3 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 llvm/test/Transforms/DeadStoreElimination/atomic-todo.ll diff --git a/clang/test/Driver/crash-ir-repro.cpp b/clang/test/Driver/crash-ir-repro.cpp index 1a2000ad1279f..599c656f0936e 100644 --- a/clang/test/Driver/crash-ir-repro.cpp +++ b/clang/test/Driver/crash-ir-repro.cpp @@ -1,11 +1,6 @@ // RUN: %clang -S -emit-llvm -o %t.ll %s // RUN: not %crash_opt %clang -S -DCRASH %s -o %t.ll 2>&1 | FileCheck %s -// TODO(boomanaiden154): This test case causes clang to raise a signal when -// running under ubsan, but not in normal build configurations. This should -// be fixed. -// UNSUPPORTED: ubsan, hwasan - // CHECK: Preprocessed source(s) and associated run script(s) are located at: // CHECK-NEXT: clang: note: diagnostic msg: {{.*}}.cpp // CHECK-NEXT: clang: note: diagnostic msg: {{.*}}.sh diff --git a/llvm/lib/Analysis/AliasAnalysis.cpp b/llvm/lib/Analysis/AliasAnalysis.cpp index f3aa16ff2f790..268afdb92d8e3 100644 --- a/llvm/lib/Analysis/AliasAnalysis.cpp +++ b/llvm/lib/Analysis/AliasAnalysis.cpp @@ -493,8 +493,7 @@ ModRefInfo AAResults::getModRefInfo(const LoadInst *L, AliasResult AR = alias(MemoryLocation::get(L), Loc, AAQI, L); if (AR == AliasResult::NoAlias) { // Synchronization effects may affect locations that do not alias. - // FIXME: Should be isStrongerThanMonotonic(). - if (isStrongerThanUnordered(L->getOrdering())) + if (isStrongerThanMonotonic(L->getOrdering())) return getSyncEffects(this, Loc, AAQI); return ModRefInfo::NoModRef; } @@ -517,8 +516,7 @@ ModRefInfo AAResults::getModRefInfo(const StoreInst *S, // specified memory cannot be modified by the store. if (AR == AliasResult::NoAlias) { // Synchronization effects may affect locations that do not alias. - // FIXME: Should be isStrongerThanMonotonic(). - if (isStrongerThanUnordered(S->getOrdering())) + if (isStrongerThanMonotonic(S->getOrdering())) return getSyncEffects(this, Loc, AAQI); return ModRefInfo::NoModRef; } diff --git a/llvm/test/Transforms/DeadStoreElimination/atomic-todo.ll b/llvm/test/Transforms/DeadStoreElimination/atomic-todo.ll deleted file mode 100644 index 1c160442f8579..0000000000000 --- a/llvm/test/Transforms/DeadStoreElimination/atomic-todo.ll +++ /dev/null @@ -1,23 +0,0 @@ -; XFAIL: * -; RUN: opt -passes=dse -S < %s | FileCheck %s - -target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" -target triple = "x86_64-apple-macosx10.7.0" - -; Basic correctness tests for atomic stores. -; Note that it turns out essentially every transformation DSE does is legal on -; atomic ops, just some transformations are not allowed across release-acquire pairs. - -@x = common global i32 0, align 4 -@y = common global i32 0, align 4 - -; DSE across monotonic load (allowed as long as the eliminated store isUnordered) -define i32 @test9() { -; CHECK-LABEL: test9 -; CHECK-NOT: store i32 0 -; CHECK: store i32 1 - store i32 0, ptr @x - %x = load atomic i32, ptr @y monotonic, align 4 - store i32 1, ptr @x - ret i32 %x -} _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
