
The author of the following files is licongtian <licongtian@loongson.cn>: - clang/lib/Basic/Targets/LoongArch.cpp - llvm/lib/Target/LoongArch/LoongArchAsmPrinter.cpp - llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp The files mentioned above implement InlineAsm for LSX and LASX as follows: - Enable clang parsing LSX/LASX register name, such as $vr0. - Support the case which operand type is 128bit or 256bit when the constraints is 'f'. - Support the way of specifying LSX/LASX register by using constraint, such as "={$xr0}". - Support the operand modifiers 'u' and 'w'. - Support and legalize the data types and register classes involved in LSX/LASX in the lowering process. Reviewed By: xen0n, SixWeining Differential Revision: https://reviews.llvm.org/D154931
15 lines
441 B
LLVM
15 lines
441 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
|
|
; RUN: llc --mtriple=loongarch64 --mattr=+lsx < %s | FileCheck %s
|
|
|
|
define void @test_w() nounwind {
|
|
; CHECK-LABEL: test_w:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: #APP
|
|
; CHECK-NEXT: vldi $vr0, 1
|
|
; CHECK-NEXT: #NO_APP
|
|
; CHECK-NEXT: ret
|
|
entry:
|
|
%0 = tail call <2 x i64> asm sideeffect "vldi ${0:w}, 1", "=f"()
|
|
ret void
|
|
}
|