diff options
author | Samuel Pitoiset <[email protected]> | 2019-03-19 23:40:32 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-03-20 09:06:35 +0100 |
commit | f4f0e3a3954ae2bfb545dea37b8967c3d7ce1909 (patch) | |
tree | 31dfeb78369a020e5d2f0ef431eddfc6f765aa2e /src | |
parent | 220c1dce1e3194ea867e6d948fc7ff5b9ef2d3a7 (diff) |
ac: use llvm.amdgcn.fract intrinsic for nir_op_ffract
Noticed with a Doom shader.
29077 shaders in 15096 tests
Totals:
SGPRS: 1282125 -> 1282133 (0.00 %)
VGPRS: 908716 -> 908616 (-0.01 %)
Spilled SGPRs: 24811 -> 24779 (-0.13 %)
Code Size: 49048176 -> 48936488 (-0.23 %) bytes
Max Waves: 244232 -> 244226 (-0.00 %)
Totals from affected shaders:
SGPRS: 229584 -> 229592 (0.00 %)
VGPRS: 163268 -> 163168 (-0.06 %)
Spilled SGPRs: 8682 -> 8650 (-0.37 %)
Code Size: 12819572 -> 12707884 (-0.87 %) bytes
Max Waves: 24398 -> 24392 (-0.02 %)
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/common/ac_llvm_build.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c index 0cab4d4a9b5..9cf1c6f8792 100644 --- a/src/amd/common/ac_llvm_build.c +++ b/src/amd/common/ac_llvm_build.c @@ -2155,19 +2155,18 @@ LLVMValueRef ac_build_fract(struct ac_llvm_context *ctx, LLVMValueRef src0, char *intr; if (bitsize == 32) { - intr = "llvm.floor.f32"; + intr = "llvm.amdgcn.fract.f32"; type = ctx->f32; } else { - intr = "llvm.floor.f64"; + intr = "llvm.amdgcn.fract.f64"; type = ctx->f64; } LLVMValueRef params[] = { src0, }; - LLVMValueRef floor = ac_build_intrinsic(ctx, intr, type, params, 1, - AC_FUNC_ATTR_READNONE); - return LLVMBuildFSub(ctx->builder, src0, floor, ""); + return ac_build_intrinsic(ctx, intr, type, params, 1, + AC_FUNC_ATTR_READNONE); } LLVMValueRef ac_build_isign(struct ac_llvm_context *ctx, LLVMValueRef src0, |