[clang] Attempt to fix buildbot failure (PR #210956)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 21 04:47:39 PDT 2026
https://github.com/eleviant created https://github.com/llvm/llvm-project/pull/210956
Value names are discarded by default on build without asserts.
>From 78ddf827810485175649e6c55cca7a1021be182f Mon Sep 17 00:00:00 2001
From: Evgeny Leviant <eleviant at accesssoftek.com>
Date: Tue, 21 Jul 2026 13:46:17 +0200
Subject: [PATCH] Attempt to fix buildbot failure
Value names are discarded by default on build without asserts.
---
clang/test/CodeGen/ptr-subtract-stable.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/clang/test/CodeGen/ptr-subtract-stable.c b/clang/test/CodeGen/ptr-subtract-stable.c
index 88581fa51c4b1..0782b987c7fec 100644
--- a/clang/test/CodeGen/ptr-subtract-stable.c
+++ b/clang/test/CodeGen/ptr-subtract-stable.c
@@ -1,13 +1,12 @@
-// RUN: %clang -S -emit-llvm -O2 --target=x86_64-windows-msvc -fdefined-pointer-subtraction -fms-extensions %s -o - | FileCheck %s
+// RUN: %clang -S -emit-llvm -O2 --target=x86_64-windows-msvc -fdefined-pointer-subtraction -fno-discard-value-names -fms-extensions %s -o - | FileCheck %s
// Check that pointer subtraction isn't nuw/nsv and sdiv isn't exact
-// CHECK-LABEL: i64 @sub(ptr noundef %p, ptr noundef %q)
+// CHECK: i64 @sub(ptr noundef %[[P:.*]], ptr noundef %[[Q:.*]])
// CHECK-NEXT: entry:
-// CHECK-NEXT: %sub.ptr.lhs.cast = ptrtoint ptr %p to i64
-// CHECK-NEXT: %sub.ptr.rhs.cast = ptrtoint ptr %q to i64
-// CHECK-NEXT: %sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
-// CHECK-NEXT: %sub.ptr.div = sdiv i64 %sub.ptr.sub, 4
-// CHECK-NEXT: ret i64 %sub.ptr.div
+// CHECK-NEXT: %[[PI:.*]] = ptrtoint ptr %[[P]] to i64
+// CHECK-NEXT: %[[QI:.*]] = ptrtoint ptr %[[Q]] to i64
+// CHECK-NEXT: %[[SB:.*]] = sub i64 %[[PI]], %[[QI]]
+// CHECK-NEXT: {{.*}} = sdiv i64 %[[SB]], 4
__declspec(noinline) long long sub(long* p, long* q) {
return p - q;
More information about the cfe-commits
mailing list