19 lines · plain
1! Test that -mprefer-vector-width works as expected.2 3! RUN: %flang_fc1 -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-DEF4! RUN: %flang_fc1 -mprefer-vector-width=none -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefixes=CHECK,CHECK-NONE5! RUN: %flang_fc1 -mprefer-vector-width=128 -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefixes=CHECK,CHECK-1286! RUN: %flang_fc1 -mprefer-vector-width=256 -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefixes=CHECK,CHECK-2567! RUN: not %flang_fc1 -mprefer-vector-width=xxx -emit-llvm -o - %s 2>&1| FileCheck %s --check-prefixes=CHECK-INVALID8 9subroutine func10end subroutine func11 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='19