<div dir="ltr">I think we should set READNONE on the intrinsic calls. Other than that:<br><div><div><br>Reviewed-by: Marek Olšák <<a href="mailto:marek.olsak@amd.com" target="_blank">marek.olsak@amd.com</a>><br><br></div><div>Marek<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 19, 2018 at 10:09 PM, Timothy Arceri <span dir="ltr"><<a href="mailto:tarceri@itsqueeze.com" target="_blank">tarceri@itsqueeze.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Fixes CTS tests:<br>
KHR-GL40.gpu_shader_fp64.built<wbr>in.frexp_double<br>
KHR-GL40.gpu_shader_fp64.built<wbr>in.frexp_dvec2<br>
KHR-GL40.gpu_shader_fp64.built<wbr>in.frexp_dvec3<br>
KHR-GL40.gpu_shader_fp64.built<wbr>in.frexp_dvec4<br>
<br>
And piglit test:<br>
tests/spec/arb_gpu_shader_fp64<wbr>/execution/built-in-functions/<wbr>fs-frexp-dvec4.shader_test<br>
---<br>
 src/amd/common/ac_nir_to_<wbr>llvm.c | 11 +++++++++++<br>
 1 file changed, 11 insertions(+)<br>
<br>
diff --git a/src/amd/common/ac_nir_to_llv<wbr>m.c b/src/amd/common/ac_nir_to_llv<wbr>m.c<br>
index a4a36c34ec..1fd2745201 100644<br>
--- a/src/amd/common/ac_nir_to_llv<wbr>m.c<br>
+++ b/src/amd/common/ac_nir_to_llv<wbr>m.c<br>
@@ -728,6 +728,17 @@ static void visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr)<br>
                result = ac_build_fdiv(&ctx->ac, instr->dest.dest.ssa.bit_size == 32 ? ctx->ac.f32_1 : ctx->ac.f64_1,<br>
                                       result);<br>
                break;<br>
+       case nir_op_frexp_exp:<br>
+               src[0] = ac_to_float(&ctx->ac, src[0]);<br>
+               result = ac_build_intrinsic(&ctx->ac, "llvm.amdgcn.frexp.exp.i32.f64<wbr>",<br>
+                                           ctx->ac.i32, src, 1, 0);<br>
+<br>
+               break;<br>
+       case nir_op_frexp_sig:<br>
+               src[0] = ac_to_float(&ctx->ac, src[0]);<br>
+               result = ac_build_intrinsic(&ctx->ac, "llvm.amdgcn.frexp.mant.f64",<br>
+                                           ctx->ac.f64, src, 1, 0);<br>
+               break;<br>
        case nir_op_fmax:<br>
                result = emit_intrin_2f_param(&ctx->ac, "llvm.maxnum",<br>
                                              ac_to_float_type(&ctx->ac, def_type), src[0], src[1]);<br>
<span class="m_-8561095708180736391HOEnZb"><font color="#888888">--<br>
2.14.3<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>