Skip to content

[test] Precommit tests for PR96025, NFC #98704

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 17, 2024
Merged

Conversation

vfdff
Copy link
Contributor

@vfdff vfdff commented Jul 13, 2024

Check whether timeout exists in the Windows operating system.

@llvmbot llvmbot added the clang Clang issues not falling into any other category label Jul 13, 2024
@llvmbot
Copy link
Member

llvmbot commented Jul 13, 2024

@llvm/pr-subscribers-clang

Author: Allen (vfdff)

Changes

Check whether timeout exists in the Windows operating system.


Full diff: https://github.com/llvm/llvm-project/pull/98704.diff

1 Files Affected:

  • (added) clang/test/CodeGen/math-libcalls-tbaa.cpp (+38)
diff --git a/clang/test/CodeGen/math-libcalls-tbaa.cpp b/clang/test/CodeGen/math-libcalls-tbaa.cpp
new file mode 100644
index 0000000000000..d67114fba6614
--- /dev/null
+++ b/clang/test/CodeGen/math-libcalls-tbaa.cpp
@@ -0,0 +1,38 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5
+
+// RUN:  %clang_cc1 -fmath-errno -O3 -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefixes=CHECK,NoNewStructPathTBAA
+// RUN:  %clang_cc1 -fmath-errno -O3 -new-struct-path-tbaa -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefixes=CHECK,NewStructPathTBAA
+
+extern "C" float expf(float);
+
+// Emit int TBAA metadata on FP math libcalls, which is useful for alias analysis
+
+// CHECK-LABEL: define dso_local noundef float @_Z3fooPffi(
+// CHECK-SAME: ptr nocapture noundef readonly [[NUM:%.*]], float noundef [[R2INV:%.*]], i32 noundef [[N:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
+// CHECK-NEXT:  [[ENTRY:.*:]]
+// CHECK-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i8, ptr [[NUM]], i64 40
+// CHECK-NEXT:    [[TMP0:%.*]] = load float, ptr [[ARRAYIDX]], align 4, !tbaa [[TBAA2:![0-9]+]]
+// CHECK-NEXT:    [[CALL:%.*]] = tail call float @expf(float noundef [[TMP0]]) #[[ATTR2:[0-9]+]]
+// CHECK-NEXT:    [[TMP1:%.*]] = load float, ptr [[ARRAYIDX]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[MUL:%.*]] = fmul float [[CALL]], [[TMP1]]
+// CHECK-NEXT:    ret float [[MUL]]
+//
+float foo (float num[], float r2inv, int n) {
+   const float expm2 =  expf(num[10]);  // Emit TBAA metadata on @expf
+   float tmp = expm2 * num[10];
+   return tmp;
+}
+//.
+// NoNewStructPathTBAA: [[TBAA2]] = !{[[META3:![0-9]+]], [[META3]], i64 0}
+// NoNewStructPathTBAA: [[META3]] = !{!"float", [[META4:![0-9]+]], i64 0}
+// NoNewStructPathTBAA: [[META4]] = !{!"omnipotent char", [[META5:![0-9]+]], i64 0}
+// NoNewStructPathTBAA: [[META5]] = !{!"Simple C++ TBAA"}
+//.
+// NewStructPathTBAA: [[TBAA2]] = !{[[META3:![0-9]+]], [[META3]], i64 0, i64 4}
+// NewStructPathTBAA: [[META3]] = !{[[META4:![0-9]+]], i64 4, !"float"}
+// NewStructPathTBAA: [[META4]] = !{[[META5:![0-9]+]], i64 1, !"omnipotent char"}
+// NewStructPathTBAA: [[META5]] = !{!"Simple C++ TBAA"}
+//.
+//// NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
+// NewStructPathTBAA: {{.*}}
+// NoNewStructPathTBAA: {{.*}}

@vfdff
Copy link
Contributor Author

vfdff commented Jul 13, 2024

require Linux for this test as it runs time out on Windows ?

@efriedma-quic
Copy link
Collaborator

From the buildbot's build log:

# \| C:\ws\src\clang\test\CodeGen\math-libcalls-tbaa.cpp:10:17: error: CHECK-LABEL: expected string not found in input
--
  | # \| // CHECK-LABEL: define dso_local noundef float @_Z3fooPffi(
  | # \|                 ^
  | # \| <stdin>:1:1: note: scanning from here
  | # \| ; ModuleID = 'C:\ws\src\clang\test\CodeGen\math-libcalls-tbaa.cpp'
  | # \| ^
  | # \| <stdin>:7:1: note: possible intended match here
  | # \| define dso_local noundef float @"?foo@@YAMQEAMMH@Z"(ptr nocapture noundef readonly %num, float noundef %r2inv, i32 noundef %n) local_unnamed_addr #0 {

@vfdff
Copy link
Contributor Author

vfdff commented Jul 16, 2024

the case pass on window target with extra extern "C" for the function, but it is strange the linux target test has not finish.

Copy link
Collaborator

@efriedma-quic efriedma-quic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Please don't use [test] as a prefix in commit messages; just use the same prefix you'd use for the code change, e.g. [clang codegen]

@vfdff
Copy link
Contributor Author

vfdff commented Jul 17, 2024

LGTM

Please don't use [test] as a prefix in commit messages; just use the same prefix you'd use for the code change, e.g. [clang codegen]

Thanks, I'll change it when land it .

@vfdff vfdff merged commit b042af3 into llvm:main Jul 17, 2024
7 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 17, 2024

LLVM Buildbot has detected a new failure on builder clang-armv8-quick running on linaro-clang-armv8-quick while building clang at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/154/builds/1496

Here is the relevant piece of the build log for the reference:

Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: CodeGen/math-libcalls-tbaa.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/lib/clang/19/include -nostdsysteminc -fmath-errno -O3 -emit-llvm -o - -x c++ /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp | /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp -check-prefixes=CHECK,NoNewStructPathTBAA
+ /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/lib/clang/19/include -nostdsysteminc -fmath-errno -O3 -emit-llvm -o - -x c++ /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp
+ /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp -check-prefixes=CHECK,NoNewStructPathTBAA
/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp:13:16: error: CHECK-NEXT: expected string not found in input
// CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i8, ptr [[NUM]], i64 40
               ^
<stdin>:8:7: note: scanning from here
entry:
      ^
<stdin>:8:7: note: with "NUM" equal to "%num"
entry:
      ^
<stdin>:9:10: note: possible intended match here
 %arrayidx = getelementptr inbounds i8, ptr %num, i32 40
         ^

Input file: <stdin>
Check file: /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           1: ; ModuleID = '/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp' 
           2: source_filename = "/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp" 
           3: target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64" 
           4: target triple = "armv8l-unknown-linux-gnueabihf" 
           5:  
           6: ; Function Attrs: mustprogress nofree nounwind willreturn memory(write, argmem: readwrite) 
           7: define dso_local float @foo(ptr nocapture noundef readonly %num, float noundef %r2inv, i32 noundef %n) local_unnamed_addr #0 { 
           8: entry: 
next:13'0           X error: no match found
next:13'1             with "NUM" equal to "%num"
           9:  %arrayidx = getelementptr inbounds i8, ptr %num, i32 40 
next:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:13'2              ?                                                possible intended match
          10:  %0 = load float, ptr %arrayidx, align 4, !tbaa !3 
next:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          11:  %call = tail call float @expf(float noundef %0) #2 
next:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          12:  %1 = load float, ptr %arrayidx, align 4, !tbaa !3 
next:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          13:  %mul = fmul float %call, %1 
next:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          14:  ret float %mul 
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 17, 2024

LLVM Buildbot has detected a new failure on builder clang-ppc64le-linux-test-suite running on ppc64le-clang-test-suite while building clang at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/95/builds/1384

Here is the relevant piece of the build log for the reference:

Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: CodeGen/math-libcalls-tbaa.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang -cc1 -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/lib/clang/19/include -nostdsysteminc -fmath-errno -O3 -emit-llvm -o - -x c++ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/test/CodeGen/math-libcalls-tbaa.cpp | /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/test/CodeGen/math-libcalls-tbaa.cpp -check-prefixes=CHECK,NoNewStructPathTBAA
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang -cc1 -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/lib/clang/19/include -nostdsysteminc -fmath-errno -O3 -emit-llvm -o - -x c++ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/test/CodeGen/math-libcalls-tbaa.cpp
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/test/CodeGen/math-libcalls-tbaa.cpp -check-prefixes=CHECK,NoNewStructPathTBAA
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/test/CodeGen/math-libcalls-tbaa.cpp:11:16: error: CHECK-SAME: expected string not found in input
// CHECK-SAME: ptr nocapture noundef readonly [[NUM:%.*]], float noundef [[R2INV:%.*]], i32 noundef [[N:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
               ^
<stdin>:7:29: note: scanning from here
define dso_local float @foo(ptr nocapture noundef readonly %num, float noundef %r2inv, i32 noundef signext %n) local_unnamed_addr #0 {
                            ^

Input file: <stdin>
Check file: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/test/CodeGen/math-libcalls-tbaa.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
         1: ; ModuleID = '/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/test/CodeGen/math-libcalls-tbaa.cpp' 
         2: source_filename = "/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/test/CodeGen/math-libcalls-tbaa.cpp" 
         3: target datalayout = "e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512" 
         4: target triple = "powerpc64le-unknown-linux-gnu" 
         5:  
         6: ; Function Attrs: mustprogress nofree nounwind willreturn memory(write, argmem: readwrite) 
         7: define dso_local float @foo(ptr nocapture noundef readonly %num, float noundef %r2inv, i32 noundef signext %n) local_unnamed_addr #0 { 
same:11                                 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
         8: entry: 
same:11     ~~~~~~~
         9:  %arrayidx = getelementptr inbounds i8, ptr %num, i64 40 
same:11     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        10:  %0 = load float, ptr %arrayidx, align 4, !tbaa !2 
same:11     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        11:  %call = tail call float @expf(float noundef %0) #2 
same:11     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        12:  %1 = load float, ptr %arrayidx, align 4, !tbaa !2 
same:11     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         .
         .
         .
>>>>>>

--

********************


@vfdff
Copy link
Contributor Author

vfdff commented Jul 17, 2024

hi @llvm-ci , would you tell the difference between clang-armv8-quick and linaro-clang-armv8-quick ?
I don't reproduce the issue when I rebase this PR to the top upstream with following instruction (I works on tsv110 server, which is a armv8 target).

llvm/utils/update_cc_test_checks.py --clang=build/bin/clang clang/test/CodeGen/math-libcalls-tbaa.cpp

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 17, 2024

LLVM Buildbot has detected a new failure on builder clang-solaris11-sparcv9 running on solaris11-sparcv9 while building clang at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/13/builds/838

Here is the relevant piece of the build log for the reference:

Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: CodeGen/math-libcalls-tbaa.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/bin/clang -cc1 -internal-isystem /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/lib/clang/19/include -nostdsysteminc -fmath-errno -O3 -emit-llvm -o - -x c++ /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp | /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/bin/FileCheck /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp -check-prefixes=CHECK,NoNewStructPathTBAA
+ /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/bin/clang -cc1 -internal-isystem /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/lib/clang/19/include -nostdsysteminc -fmath-errno -O3 -emit-llvm -o - -x c++ /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp
+ /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/bin/FileCheck /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp -check-prefixes=CHECK,NoNewStructPathTBAA
/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp:11:16: error: CHECK-SAME: expected string not found in input
// CHECK-SAME: ptr nocapture noundef readonly [[NUM:%.*]], float noundef [[R2INV:%.*]], i32 noundef [[N:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
               ^
<stdin>:7:29: note: scanning from here
define dso_local float @foo(ptr nocapture noundef readonly %num, float noundef %r2inv, i32 noundef signext %n) local_unnamed_addr #0 {
                            ^

Input file: <stdin>
Check file: /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
         1: ; ModuleID = '/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp' 
         2: source_filename = "/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp" 
         3: target datalayout = "E-m:e-i64:64-n32:64-S128" 
         4: target triple = "sparcv9-sun-solaris2.11" 
         5:  
         6: ; Function Attrs: mustprogress nofree nounwind willreturn memory(write, argmem: readwrite) 
         7: define dso_local float @foo(ptr nocapture noundef readonly %num, float noundef %r2inv, i32 noundef signext %n) local_unnamed_addr #0 { 
same:11                                 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
         8: entry: 
same:11     ~~~~~~~
         9:  %arrayidx = getelementptr inbounds i8, ptr %num, i64 40 
same:11     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        10:  %0 = load float, ptr %arrayidx, align 4, !tbaa !2 
same:11     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        11:  %call = tail call float @expf(float noundef %0) #2 
same:11     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        12:  %1 = load float, ptr %arrayidx, align 4, !tbaa !2 
same:11     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         .
         .
         .
>>>>>>

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 17, 2024

LLVM Buildbot has detected a new failure on builder clang-ppc64le-linux-multistage running on ppc64le-clang-multistage-test while building clang at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/76/builds/1076

Here is the relevant piece of the build log for the reference:

Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: CodeGen/math-libcalls-tbaa.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/bin/clang -cc1 -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/lib/clang/19/include -nostdsysteminc -fmath-errno -O3 -emit-llvm -o - -x c++ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp | /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp -check-prefixes=CHECK,NoNewStructPathTBAA
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/bin/clang -cc1 -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/lib/clang/19/include -nostdsysteminc -fmath-errno -O3 -emit-llvm -o - -x c++ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp -check-prefixes=CHECK,NoNewStructPathTBAA
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp:11:16: error: CHECK-SAME: expected string not found in input
// CHECK-SAME: ptr nocapture noundef readonly [[NUM:%.*]], float noundef [[R2INV:%.*]], i32 noundef [[N:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
               ^
<stdin>:7:29: note: scanning from here
define dso_local float @foo(ptr nocapture noundef readonly %num, float noundef %r2inv, i32 noundef signext %n) local_unnamed_addr #0 {
                            ^

Input file: <stdin>
Check file: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
         1: ; ModuleID = '/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp' 
         2: source_filename = "/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp" 
         3: target datalayout = "e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512" 
         4: target triple = "powerpc64le-unknown-linux-gnu" 
         5:  
         6: ; Function Attrs: mustprogress nofree nounwind willreturn memory(write, argmem: readwrite) 
         7: define dso_local float @foo(ptr nocapture noundef readonly %num, float noundef %r2inv, i32 noundef signext %n) local_unnamed_addr #0 { 
same:11                                 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
         8: entry: 
same:11     ~~~~~~~
         9:  %arrayidx = getelementptr inbounds i8, ptr %num, i64 40 
same:11     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        10:  %0 = load float, ptr %arrayidx, align 4, !tbaa !2 
same:11     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        11:  %call = tail call float @expf(float noundef %0) #2 
same:11     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        12:  %1 = load float, ptr %arrayidx, align 4, !tbaa !2 
same:11     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         .
         .
         .
>>>>>>

--

********************

Step 11 (ninja check 2) failure: stage 2 checked (failure)
******************** TEST 'Clang :: CodeGen/math-libcalls-tbaa.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/bin/clang -cc1 -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/lib/clang/19/include -nostdsysteminc -fmath-errno -O3 -emit-llvm -o - -x c++ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp | /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp -check-prefixes=CHECK,NoNewStructPathTBAA
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/bin/clang -cc1 -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/lib/clang/19/include -nostdsysteminc -fmath-errno -O3 -emit-llvm -o - -x c++ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp -check-prefixes=CHECK,NoNewStructPathTBAA
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp:11:16: error: CHECK-SAME: expected string not found in input
// CHECK-SAME: ptr nocapture noundef readonly [[NUM:%.*]], float noundef [[R2INV:%.*]], i32 noundef [[N:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
               ^
<stdin>:7:29: note: scanning from here
define dso_local float @foo(ptr nocapture noundef readonly %num, float noundef %r2inv, i32 noundef signext %n) local_unnamed_addr #0 {
                            ^

Input file: <stdin>
Check file: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
         1: ; ModuleID = '/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp' 
         2: source_filename = "/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp" 
         3: target datalayout = "e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512" 
         4: target triple = "powerpc64le-unknown-linux-gnu" 
         5:  
         6: ; Function Attrs: mustprogress nofree nounwind willreturn memory(write, argmem: readwrite) 
         7: define dso_local float @foo(ptr nocapture noundef readonly %num, float noundef %r2inv, i32 noundef signext %n) local_unnamed_addr #0 { 
same:11                                 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
         8: entry: 
same:11     ~~~~~~~
         9:  %arrayidx = getelementptr inbounds i8, ptr %num, i64 40 
same:11     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        10:  %0 = load float, ptr %arrayidx, align 4, !tbaa !2 
same:11     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        11:  %call = tail call float @expf(float noundef %0) #2 
same:11     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        12:  %1 = load float, ptr %arrayidx, align 4, !tbaa !2 
same:11     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         .
         .
         .
>>>>>>

--

********************


@vfdff
Copy link
Contributor Author

vfdff commented Jul 17, 2024

Oh, different targets may have different flag for argument, so should add target triple ?

+++ b/clang/test/CodeGen/math-libcalls-tbaa.cpp
@@ -1,14 +1,14 @@
 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5
 
-// RUN:  %clang_cc1 -fmath-errno -O3 -emit-llvm -o - %s | FileCheck %s -check-prefixes=CHECK,NoNewStructPathTBAA
-// RUN:  %clang_cc1 -fmath-errno -O3 -new-struct-path-tbaa -emit-llvm -o - %s | FileCheck %s -check-prefixes=CHECK,NewStructPathTBAA
+// RUN:  %clang_cc1 -triple powerpc64le-unknown-linux-gnu -fmath-errno -O3 -emit-llvm -o - %s | FileCheck %s -check-prefixes=CHECK,NoNewStructPathTBAA
+// RUN:  %clang_cc1 -triple powerpc64le-unknown-linux-gnu -fmath-errno -O3 -new-struct-path-tbaa -emit-llvm -o - %s | FileCheck %s -check-prefixes=CHECK,NewStructPathTBAA
 
 extern "C" float expf(float);
 
 // Emit int TBAA metadata on FP math libcalls, which is useful for alias analysis
 
 // CHECK-LABEL: define dso_local float @foo(
-// CHECK-SAME: ptr nocapture noundef readonly [[NUM:%.*]], float noundef [[R2INV:%.*]], i32 noundef [[N:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
+// CHECK-SAME: ptr nocapture noundef readonly [[NUM:%.*]], float noundef [[R2INV:%.*]], i32 noundef signext [[N:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 17, 2024

LLVM Buildbot has detected a new failure on builder clang-ppc64le-rhel running on ppc64le-clang-rhel-test while building clang at step 7 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/145/builds/610

Here is the relevant piece of the build log for the reference:

Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: CodeGen/math-libcalls-tbaa.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/bin/clang -cc1 -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/clang/19/include -nostdsysteminc -fmath-errno -O3 -emit-llvm -o - -x c++ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/CodeGen/math-libcalls-tbaa.cpp | /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/CodeGen/math-libcalls-tbaa.cpp -check-prefixes=CHECK,NoNewStructPathTBAA
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/bin/clang -cc1 -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/clang/19/include -nostdsysteminc -fmath-errno -O3 -emit-llvm -o - -x c++ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/CodeGen/math-libcalls-tbaa.cpp
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/CodeGen/math-libcalls-tbaa.cpp -check-prefixes=CHECK,NoNewStructPathTBAA
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/CodeGen/math-libcalls-tbaa.cpp:11:16: error: CHECK-SAME: expected string not found in input
// CHECK-SAME: ptr nocapture noundef readonly [[NUM:%.*]], float noundef [[R2INV:%.*]], i32 noundef [[N:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
               ^
<stdin>:7:29: note: scanning from here
define dso_local float @foo(ptr nocapture noundef readonly %num, float noundef %r2inv, i32 noundef signext %n) local_unnamed_addr #0 {
                            ^

Input file: <stdin>
Check file: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/CodeGen/math-libcalls-tbaa.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
         1: ; ModuleID = '/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/CodeGen/math-libcalls-tbaa.cpp' 
         2: source_filename = "/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang/test/CodeGen/math-libcalls-tbaa.cpp" 
         3: target datalayout = "e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512" 
         4: target triple = "powerpc64le-unknown-linux-gnu" 
         5:  
         6: ; Function Attrs: mustprogress nofree nounwind willreturn memory(write, argmem: readwrite) 
         7: define dso_local float @foo(ptr nocapture noundef readonly %num, float noundef %r2inv, i32 noundef signext %n) local_unnamed_addr #0 { 
same:11                                 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
         8: entry: 
same:11     ~~~~~~~
         9:  %arrayidx = getelementptr inbounds i8, ptr %num, i64 40 
same:11     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        10:  %0 = load float, ptr %arrayidx, align 4, !tbaa !2 
same:11     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        11:  %call = tail call float @expf(float noundef %0) #2 
same:11     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        12:  %1 = load float, ptr %arrayidx, align 4, !tbaa !2 
same:11     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         .
         .
         .
>>>>>>

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 17, 2024

LLVM Buildbot has detected a new failure on builder clang-armv7-global-isel running on linaro-clang-armv7-global-isel while building clang at step 7 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/39/builds/569

Here is the relevant piece of the build log for the reference:

Step 7 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: CodeGen/math-libcalls-tbaa.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/lib/clang/19/include -nostdsysteminc -fmath-errno -O3 -emit-llvm -o - -x c++ /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp | /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp -check-prefixes=CHECK,NoNewStructPathTBAA
+ /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp -check-prefixes=CHECK,NoNewStructPathTBAA
+ /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/lib/clang/19/include -nostdsysteminc -fmath-errno -O3 -emit-llvm -o - -x c++ /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp
/home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp:13:16: error: CHECK-NEXT: expected string not found in input
// CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i8, ptr [[NUM]], i64 40
               ^
<stdin>:8:7: note: scanning from here
entry:
      ^
<stdin>:8:7: note: with "NUM" equal to "%num"
entry:
      ^
<stdin>:9:10: note: possible intended match here
 %arrayidx = getelementptr inbounds i8, ptr %num, i32 40
         ^

Input file: <stdin>
Check file: /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           1: ; ModuleID = '/home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp' 
           2: source_filename = "/home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/clang/test/CodeGen/math-libcalls-tbaa.cpp" 
           3: target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64" 
           4: target triple = "armv8l-unknown-linux-gnueabihf" 
           5:  
           6: ; Function Attrs: mustprogress nofree nounwind willreturn memory(write, argmem: readwrite) 
           7: define dso_local float @foo(ptr nocapture noundef readonly %num, float noundef %r2inv, i32 noundef %n) local_unnamed_addr #0 { 
           8: entry: 
next:13'0           X error: no match found
next:13'1             with "NUM" equal to "%num"
           9:  %arrayidx = getelementptr inbounds i8, ptr %num, i32 40 
next:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:13'2              ?                                                possible intended match
          10:  %0 = load float, ptr %arrayidx, align 4, !tbaa !3 
next:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          11:  %call = tail call float @expf(float noundef %0) #2 
next:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          12:  %1 = load float, ptr %arrayidx, align 4, !tbaa !3 
next:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          13:  %mul = fmul float %call, %1 
next:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          14:  ret float %mul 
...

yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
Summary: Add extern "C" for the function because there is difference function naming rules between Linux and Windows

Test Plan: 

Reviewers: 

Subscribers: 

Tasks: 

Tags: 


Differential Revision: https://phabricator.intern.facebook.com/D60250932
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants