r323360 - [Hexagon] Accept lowercase b in -hvx-length=64b and -hvx-length=128b
Hans Wennborg via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 30 07:18:01 PST 2018
Merged to 6.0 in r323769.
On Wed, Jan 24, 2018 at 7:42 PM, Krzysztof Parzyszek via cfe-commits <
cfe-commits at lists.llvm.org> wrote:
> Author: kparzysz
> Date: Wed Jan 24 10:42:19 2018
> New Revision: 323360
>
> URL: http://llvm.org/viewvc/llvm-project?rev=323360&view=rev
> Log:
> [Hexagon] Accept lowercase b in -hvx-length=64b and -hvx-length=128b
>
> Modified:
> cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp
> cfe/trunk/test/Driver/hexagon-hvx.c
>
> Modified: cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/
> ToolChains/Hexagon.cpp?rev=323360&r1=323359&r2=323360&view=diff
> ============================================================
> ==================
> --- cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp (original)
> +++ cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp Wed Jan 24 10:42:19 2018
> @@ -46,7 +46,7 @@ static void handleHVXWarnings(const Driv
> // Handle the unsupported values passed to mhvx-length.
> if (Arg *A = Args.getLastArg(options::OPT_mhexagon_hvx_length_EQ)) {
> StringRef Val = A->getValue();
> - if (Val != "64B" && Val != "128B")
> + if (!Val.equals_lower("64b") && !Val.equals_lower("128b"))
> D.Diag(diag::err_drv_unsupported_option_argument)
> << A->getOption().getName() << Val;
> }
>
> Modified: cfe/trunk/test/Driver/hexagon-hvx.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/
> hexagon-hvx.c?rev=323360&r1=323359&r2=323360&view=diff
> ============================================================
> ==================
> --- cfe/trunk/test/Driver/hexagon-hvx.c (original)
> +++ cfe/trunk/test/Driver/hexagon-hvx.c Wed Jan 24 10:42:19 2018
> @@ -21,6 +21,9 @@
>
> // RUN: %clang -c %s -### -target hexagon-unknown-elf -mv62 -mhvx \
> // RUN: -mhvx-length=128B 2>&1 | FileCheck -check-prefix=CHECKHVX2 %s
> +
> +// RUN: %clang -c %s -### -target hexagon-unknown-elf -mv62 -mhvx \
> +// RUN: -mhvx-length=128b 2>&1 | FileCheck -check-prefix=CHECKHVX2 %s
> // CHECKHVX2-NOT: "-target-feature" "+hvx-length64b"
> // CHECKHVX2: "-target-feature" "+hvx-length128b"
>
> @@ -79,8 +82,10 @@
> // The default mode on v60,v62 is 64B.
> // RUN: %clang -c %s -### -target hexagon-unknown-elf -mv60 -mhvx \
> // RUN: 2>&1 | FileCheck -check-prefix=CHECK-HVXLENGTH-64B %s
> -// RUN: %clang -c %s -### -target hexagon-unknown-elf -mv60 -mhvx
> -mhvx-length=64B\
> -// RUN: 2>&1 | FileCheck -check-prefix=CHECK-HVXLENGTH-64B %s
> +// RUN: %clang -c %s -### -target hexagon-unknown-elf -mv60 -mhvx \
> +// RUN: -mhvx-length=64b 2>&1 | FileCheck -check-prefix=CHECK-HVXLENGTH-64B
> %s
> +// RUN: %clang -c %s -### -target hexagon-unknown-elf -mv60 -mhvx \
> +// RUN: -mhvx-length=64B 2>&1 | FileCheck -check-prefix=CHECK-HVXLENGTH-64B
> %s
> // CHECK-HVXLENGTH-64B: "-target-feature" "+hvx{{.*}}" "-target-feature"
> "+hvx-length64b"
> // RUN: %clang -c %s -### -target hexagon-unknown-elf -mv62 -mhvx
> -mhvx-length=128B\
> // RUN: 2>&1 | FileCheck -check-prefix=CHECK-HVXLENGTH-128B %s
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180130/cf6802a6/attachment-0001.html>
More information about the cfe-commits
mailing list