diff options
| author | Pirama Arumuga Nainar <pirama@google.com> | 2019-08-08 17:50:39 +0000 |
|---|---|---|
| committer | Pirama Arumuga Nainar <pirama@google.com> | 2019-08-08 17:50:39 +0000 |
| commit | 0cb2a33dfd3e87a01d5eab3effbe033db10300eb (patch) | |
| tree | d408490704dc65fe5cca504356baaa90372dc1aa /llvm/lib | |
| parent | 57f471f4ff431cfc29ea0849a42829cc52e5f40a (diff) | |
| download | bcm5719-llvm-0cb2a33dfd3e87a01d5eab3effbe033db10300eb.tar.gz bcm5719-llvm-0cb2a33dfd3e87a01d5eab3effbe033db10300eb.zip | |
[AArch64] Do not emit '#' before immediates in inline asm
Summary:
The A64 assembly language does not require the '#' character to
introduce constant immediate operands. Avoid the '#' since the AArch64
asm parser does not accept '#' before the lane specifier and rejects the
following:
__asm__ ("fmla v2.4s, v0.4s, v1.s[%0]" :: "I"(0x1))
Fix a test to not expect the '#' and add a new test case with the above
asm.
Fixes: https://github.com/android-ndk/ndk/issues/1036
Reviewers: peter.smith, kristof.beyls
Subscribers: javed.absar, hiraditya, llvm-commits, srhines
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65550
llvm-svn: 368320
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp index 6de41d25b3c..5fb12a16561 100644 --- a/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp +++ b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp @@ -492,8 +492,7 @@ void AArch64AsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNum, break; } case MachineOperand::MO_Immediate: { - int64_t Imm = MO.getImm(); - O << '#' << Imm; + O << MO.getImm(); break; } case MachineOperand::MO_GlobalAddress: { |

