[flang-commits] [flang] c5a56f7 - [flang] Fix ppc64le-flang-rhel-test buildbot failure (#142269)

via flang-commits flang-commits at lists.llvm.org
Mon Jun 2 04:12:21 PDT 2025


Author: Cameron McInally
Date: 2025-06-02T05:12:18-06:00
New Revision: c5a56f74fef788c1b5c947462440a4de2a241094

URL: https://github.com/llvm/llvm-project/commit/c5a56f74fef788c1b5c947462440a4de2a241094
DIFF: https://github.com/llvm/llvm-project/commit/c5a56f74fef788c1b5c947462440a4de2a241094.diff

LOG: [flang] Fix ppc64le-flang-rhel-test buildbot failure (#142269)

PR#142073 introduced a new test that checks the
prefer-vector-width function attribute. This test was not accounting for
target triples that include default function attributes.

This patch updates prefer-vector-width.f90 to ignore extra function
attributes.

---------

Co-authored-by: Cameron McInally <cmcinally at nvidia.com>

Added: 
    

Modified: 
    flang/test/Driver/prefer-vector-width.f90

Removed: 
    


################################################################################
diff  --git a/flang/test/Driver/prefer-vector-width.f90 b/flang/test/Driver/prefer-vector-width.f90
index 8a66a24b88bab..3622b28056332 100644
--- a/flang/test/Driver/prefer-vector-width.f90
+++ b/flang/test/Driver/prefer-vector-width.f90
@@ -1,16 +1,18 @@
 ! Test that -mprefer-vector-width works as expected.
 
 ! RUN: %flang_fc1 -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-DEF
-! RUN: %flang_fc1 -mprefer-vector-width=none -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-NONE
-! RUN: %flang_fc1 -mprefer-vector-width=128 -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-128
-! RUN: %flang_fc1 -mprefer-vector-width=256 -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-256
-! RUN: not %flang_fc1 -mprefer-vector-width=xxx  -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-INVALID
+! RUN: %flang_fc1 -mprefer-vector-width=none -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefixes=CHECK,CHECK-NONE
+! RUN: %flang_fc1 -mprefer-vector-width=128 -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefixes=CHECK,CHECK-128
+! RUN: %flang_fc1 -mprefer-vector-width=256 -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefixes=CHECK,CHECK-256
+! RUN: not %flang_fc1 -mprefer-vector-width=xxx  -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefixes=CHECK-INVALID
 
 subroutine func
 end subroutine func
 
-! CHECK-DEF-NOT: attributes #0 = { "prefer-vector-width"={{.*}}
-! CHECK-NONE: attributes #0 = { "prefer-vector-width"="none"
-! CHECK-128: attributes #0 = { "prefer-vector-width"="128"
-! CHECK-256: attributes #0 = { "prefer-vector-width"="256"
-! CHECK-INVALID:error: invalid value 'xxx' in '-mprefer-vector-width=xxx'
+! CHECK: define {{.+}} @func{{.*}} #[[ATTRS:[0-9]+]]
+! CHECK: attributes #[[ATTRS]] =
+! CHECK-DEF-NOT: "prefer-vector-width"
+! CHECK-NONE-SAME: "prefer-vector-width"="none"
+! CHECK-128-SAME: "prefer-vector-width"="128"
+! CHECK-256-SAME: "prefer-vector-width"="256"
+! CHECK-INVALID: error: invalid value 'xxx' in '-mprefer-vector-width=xxx'
\ No newline at end of file


        


More information about the flang-commits mailing list