Skip to content

Commit c5a56f7

Browse files
mcinallyCameron McInally
andauthored
[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 <[email protected]>
1 parent 67c67cd commit c5a56f7

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
! Test that -mprefer-vector-width works as expected.
22

33
! RUN: %flang_fc1 -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-DEF
4-
! RUN: %flang_fc1 -mprefer-vector-width=none -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-NONE
5-
! RUN: %flang_fc1 -mprefer-vector-width=128 -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-128
6-
! RUN: %flang_fc1 -mprefer-vector-width=256 -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-256
7-
! RUN: not %flang_fc1 -mprefer-vector-width=xxx -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-INVALID
4+
! RUN: %flang_fc1 -mprefer-vector-width=none -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefixes=CHECK,CHECK-NONE
5+
! RUN: %flang_fc1 -mprefer-vector-width=128 -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefixes=CHECK,CHECK-128
6+
! RUN: %flang_fc1 -mprefer-vector-width=256 -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefixes=CHECK,CHECK-256
7+
! RUN: not %flang_fc1 -mprefer-vector-width=xxx -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefixes=CHECK-INVALID
88

99
subroutine func
1010
end subroutine func
1111

12-
! CHECK-DEF-NOT: attributes #0 = { "prefer-vector-width"={{.*}}
13-
! CHECK-NONE: attributes #0 = { "prefer-vector-width"="none"
14-
! CHECK-128: attributes #0 = { "prefer-vector-width"="128"
15-
! CHECK-256: attributes #0 = { "prefer-vector-width"="256"
16-
! CHECK-INVALID:error: invalid value 'xxx' in '-mprefer-vector-width=xxx'
12+
! CHECK: define {{.+}} @func{{.*}} #[[ATTRS:[0-9]+]]
13+
! CHECK: attributes #[[ATTRS]] =
14+
! CHECK-DEF-NOT: "prefer-vector-width"
15+
! CHECK-NONE-SAME: "prefer-vector-width"="none"
16+
! CHECK-128-SAME: "prefer-vector-width"="128"
17+
! CHECK-256-SAME: "prefer-vector-width"="256"
18+
! CHECK-INVALID: error: invalid value 'xxx' in '-mprefer-vector-width=xxx'

0 commit comments

Comments
 (0)