From 1666977cd04c823be21edc124169551fc2a85be7 Mon Sep 17 00:00:00 2001 From: Ranjeet Singh Date: Mon, 8 Jun 2015 21:32:16 +0000 Subject: [PATCH] [AArch64] AsmParser should be case insensitive about accepting vector register names. Differential Revision: http://reviews.llvm.org/D10320 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239353 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp | 2 +- test/MC/AArch64/case-insen-reg-names.s | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 test/MC/AArch64/case-insen-reg-names.s diff --git a/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp b/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp index 41615b6ede0..063c053ffe8 100644 --- a/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp +++ b/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp @@ -1764,7 +1764,7 @@ static unsigned MatchRegisterName(StringRef Name); /// } static unsigned matchVectorRegName(StringRef Name) { - return StringSwitch(Name) + return StringSwitch(Name.lower()) .Case("v0", AArch64::Q0) .Case("v1", AArch64::Q1) .Case("v2", AArch64::Q2) diff --git a/test/MC/AArch64/case-insen-reg-names.s b/test/MC/AArch64/case-insen-reg-names.s new file mode 100644 index 00000000000..b31ab675a7e --- /dev/null +++ b/test/MC/AArch64/case-insen-reg-names.s @@ -0,0 +1,8 @@ +// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding < %s | FileCheck %s + +fadd v0.2d, v5.2d, v6.2d +fadd V0.2d, V5.2d, V6.2d +fadd v0.2d, V5.2d, v6.2d +// CHECK: fadd v0.2d, v5.2d, v6.2d // encoding: [0xa0,0xd4,0x66,0x4e] +// CHECK: fadd v0.2d, v5.2d, v6.2d // encoding: [0xa0,0xd4,0x66,0x4e] +// CHECK: fadd v0.2d, v5.2d, v6.2d // encoding: [0xa0,0xd4,0x66,0x4e] -- 2.34.1