<div dir="ltr">Tested-by: Chuck Atkins <<a href="mailto:chuck.atkins@kitware.com">chuck.atkins@kitware.com</a>><br></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 16, 2018 at 8:51 AM Cherniak, Bruce <<a href="mailto:bruce.cherniak@intel.com">bruce.cherniak@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Reviewed-by: Bruce Cherniak <<a href="mailto:bruce.cherniak@intel.com" target="_blank">bruce.cherniak@intel.com</a>><br>
<br>
> On Oct 15, 2018, at 9:53 AM, Alok Hota <<a href="mailto:alok.hota@intel.com" target="_blank">alok.hota@intel.com</a>> wrote:<br>
> <br>
> Converted from x86 VFMADDPS intrinsic to generic LLVM intrinsic, and<br>
> removed createInstructionSimplifierPass, which were both removed in LLVM<br>
> 7.0.0<br>
> <br>
> These changes combine patches we received from the community and our own<br>
> internal patches<br>
> ---<br>
> .../swr/rasterizer/codegen/gen_llvm_ir_macros.py | 2 +-<br>
> .../drivers/swr/rasterizer/jitter/blend_jit.cpp | 1 -<br>
> .../drivers/swr/rasterizer/jitter/builder_misc.cpp | 11 ++---------<br>
> .../drivers/swr/rasterizer/jitter/fetch_jit.cpp | 1 -<br>
> .../rasterizer/jitter/functionpasses/lower_x86.cpp | 1 -<br>
> .../drivers/swr/rasterizer/jitter/streamout_jit.cpp | 1 -<br>
> 6 files changed, 3 insertions(+), 14 deletions(-)<br>
> <br>
> diff --git a/src/gallium/drivers/swr/rasterizer/codegen/gen_llvm_ir_macros.py b/src/gallium/drivers/swr/rasterizer/codegen/gen_llvm_ir_macros.py<br>
> index 2e7f1a88a0..d34e88d1bc 100644<br>
> --- a/src/gallium/drivers/swr/rasterizer/codegen/gen_llvm_ir_macros.py<br>
> +++ b/src/gallium/drivers/swr/rasterizer/codegen/gen_llvm_ir_macros.py<br>
> @@ -57,7 +57,6 @@ intrinsics = [<br>
> ['VHSUBPS', ['a', 'b'], 'a'],<br>
> ['VPTESTC', ['a', 'b'], 'mInt32Ty'],<br>
> ['VPTESTZ', ['a', 'b'], 'mInt32Ty'],<br>
> - ['VFMADDPS', ['a', 'b', 'c'], 'a'],<br>
> ['VPHADDD', ['a', 'b'], 'a'],<br>
> ['PDEP32', ['a', 'b'], 'a'],<br>
> ['RDTSC', [], 'mInt64Ty'],<br>
> @@ -71,6 +70,7 @@ llvm_intrinsics = [<br>
> ['STACKRESTORE', 'stackrestore', ['a'], []],<br>
> ['VMINPS', 'minnum', ['a', 'b'], ['a']],<br>
> ['VMAXPS', 'maxnum', ['a', 'b'], ['a']],<br>
> + ['VFMADDPS', 'fmuladd', ['a', 'b', 'c'], ['a']],<br>
> ['DEBUGTRAP', 'debugtrap', [], []],<br>
> ['POPCNT', 'ctpop', ['a'], ['a']],<br>
> ['LOG2', 'log2', ['a'], ['a']],<br>
> diff --git a/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp<br>
> index f89c502db7..d5328c8e4e 100644<br>
> --- a/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp<br>
> +++ b/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp<br>
> @@ -870,7 +870,6 @@ struct BlendJit : public Builder<br>
> passes.add(createCFGSimplificationPass());<br>
> passes.add(createEarlyCSEPass());<br>
> passes.add(createInstructionCombiningPass());<br>
> - passes.add(createInstructionSimplifierPass());<br>
> passes.add(createConstantPropagationPass());<br>
> passes.add(createSCCPPass());<br>
> passes.add(createAggressiveDCEPass());<br>
> diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp b/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp<br>
> index 4116dad443..26d8688f5e 100644<br>
> --- a/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp<br>
> +++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp<br>
> @@ -755,15 +755,8 @@ namespace SwrJit<br>
> Value* Builder::FMADDPS(Value* a, Value* b, Value* c)<br>
> {<br>
> Value* vOut;<br>
> - // use FMADs if available<br>
> - if (JM()->mArch.AVX2())<br>
> - {<br>
> - vOut = VFMADDPS(a, b, c);<br>
> - }<br>
> - else<br>
> - {<br>
> - vOut = FADD(FMUL(a, b), c);<br>
> - }<br>
> + // This maps to LLVM fmuladd intrinsic<br>
> + vOut = VFMADDPS(a, b, c);<br>
> return vOut;<br>
> }<br>
> <br>
> diff --git a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp<br>
> index b4d326ebdc..3ad0fabe81 100644<br>
> --- a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp<br>
> +++ b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp<br>
> @@ -294,7 +294,6 @@ Function* FetchJit::Create(const FETCH_COMPILE_STATE& fetchState)<br>
> optPasses.add(createCFGSimplificationPass());<br>
> optPasses.add(createEarlyCSEPass());<br>
> optPasses.add(createInstructionCombiningPass());<br>
> - optPasses.add(createInstructionSimplifierPass());<br>
> optPasses.add(createConstantPropagationPass());<br>
> optPasses.add(createSCCPPass());<br>
> optPasses.add(createAggressiveDCEPass());<br>
> diff --git a/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp b/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp<br>
> index 7605823c04..c34959d35e 100644<br>
> --- a/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp<br>
> +++ b/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp<br>
> @@ -76,7 +76,6 @@ namespace SwrJit<br>
> {"meta.intrinsic.VCVTPS2PH", Intrinsic::x86_vcvtps2ph_256},<br>
> {"meta.intrinsic.VPTESTC", Intrinsic::x86_avx_ptestc_256},<br>
> {"meta.intrinsic.VPTESTZ", Intrinsic::x86_avx_ptestz_256},<br>
> - {"meta.intrinsic.VFMADDPS", Intrinsic::x86_fma_vfmadd_ps_256},<br>
> {"meta.intrinsic.VPHADDD", Intrinsic::x86_avx2_phadd_d},<br>
> {"meta.intrinsic.PDEP32", Intrinsic::x86_bmi_pdep_32},<br>
> {"meta.intrinsic.RDTSC", Intrinsic::x86_rdtsc},<br>
> diff --git a/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp<br>
> index 8f86af2a4b..11ad36521b 100644<br>
> --- a/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp<br>
> +++ b/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp<br>
> @@ -306,7 +306,6 @@ struct StreamOutJit : public Builder<br>
> passes.add(createCFGSimplificationPass());<br>
> passes.add(createEarlyCSEPass());<br>
> passes.add(createInstructionCombiningPass());<br>
> - passes.add(createInstructionSimplifierPass());<br>
> passes.add(createConstantPropagationPass());<br>
> passes.add(createSCCPPass());<br>
> passes.add(createAggressiveDCEPass());<br>
> -- <br>
> 2.17.1<br>
> <br>
> _______________________________________________<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/mailman/listinfo/mesa-dev</a><br>
<br>
_______________________________________________<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/mailman/listinfo/mesa-dev</a><br>
</blockquote></div>