mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-29 23:12:55 +01:00
70be5dff43
Print the range of registers used with a single letter prefix. This better matches what the shader compiler produces and is overall less obnoxious than concatenating all of the subregister names together. Instead of SGPR0, it will print s0. Instead of SGPR0_SGPR1, it will print s[0:1] and so on. There doesn't appear to be a straightforward way to get the actual register info in the InstPrinter, so this parses the generated name to print with the new syntax. The required test changes are pretty nasty, and register matching regexes are now worse. Since there isn't a way to add to a variable in FileCheck, some of the tests now don't check the exact number of registers used, but I don't think that will be a real problem. llvm-svn: 194443
32 lines
1.2 KiB
LLVM
32 lines
1.2 KiB
LLVM
; RUN: llc < %s -march=r600 -mcpu=SI -verify-machineinstrs | FileCheck %s
|
|
|
|
; CHECK: @fmuladd_f32
|
|
; CHECK: V_MAD_F32 {{v[0-9]+, v[0-9]+, v[0-9]+, v[0-9]+}}
|
|
|
|
define void @fmuladd_f32(float addrspace(1)* %out, float addrspace(1)* %in1,
|
|
float addrspace(1)* %in2, float addrspace(1)* %in3) {
|
|
%r0 = load float addrspace(1)* %in1
|
|
%r1 = load float addrspace(1)* %in2
|
|
%r2 = load float addrspace(1)* %in3
|
|
%r3 = tail call float @llvm.fmuladd.f32(float %r0, float %r1, float %r2)
|
|
store float %r3, float addrspace(1)* %out
|
|
ret void
|
|
}
|
|
|
|
declare float @llvm.fmuladd.f32(float, float, float)
|
|
|
|
; CHECK: @fmuladd_f64
|
|
; CHECK: V_FMA_F64 {{v\[[0-9]+:[0-9]+\], v\[[0-9]+:[0-9]+\], v\[[0-9]+:[0-9]+\], v\[[0-9]+:[0-9]+\]}}
|
|
|
|
define void @fmuladd_f64(double addrspace(1)* %out, double addrspace(1)* %in1,
|
|
double addrspace(1)* %in2, double addrspace(1)* %in3) {
|
|
%r0 = load double addrspace(1)* %in1
|
|
%r1 = load double addrspace(1)* %in2
|
|
%r2 = load double addrspace(1)* %in3
|
|
%r3 = tail call double @llvm.fmuladd.f64(double %r0, double %r1, double %r2)
|
|
store double %r3, double addrspace(1)* %out
|
|
ret void
|
|
}
|
|
|
|
declare double @llvm.fmuladd.f64(double, double, double)
|