[all-commits] [llvm/llvm-project] afb24c: AMDGPU: Don't require all flags to expand fast powr

Matt Arsenault via All-commits all-commits at lists.llvm.org
Fri Sep 1 05:22:32 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: afb24cbb6965a8fd5329c8332112aa0de0af5d61
      https://github.com/llvm/llvm-project/commit/afb24cbb6965a8fd5329c8332112aa0de0af5d61
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-09-01 (Fri, 01 Sep 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pow.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pown.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-powr.ll

  Log Message:
  -----------
  AMDGPU: Don't require all flags to expand fast powr

This was requiring all fast math flags, which is practically
useless. This wouldn't fire using all the standard OpenCL fast math
flags. This only needs afn nnan and ninf.

https://reviews.llvm.org/D158904


  Commit: f5d8a9b1bbf2b9894c653a5807753d268e13fc11
      https://github.com/llvm/llvm-project/commit/f5d8a9b1bbf2b9894c653a5807753d268e13fc11
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-09-01 (Fri, 01 Sep 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pow.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pown.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-powr.ll

  Log Message:
  -----------
  AMDGPU: Simplify handling of constant vectors in libcalls

Also fixes not handling the partially undef case.

https://reviews.llvm.org/D158905


  Commit: a45b787c91af623add62f4f927f51fb782a2dee6
      https://github.com/llvm/llvm-project/commit/a45b787c91af623add62f4f927f51fb782a2dee6
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-09-01 (Fri, 01 Sep 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pow.ll

  Log Message:
  -----------
  AMDGPU: Turn pow libcalls into powr

powr is just pow with the assumption that x >= 0, otherwise nan. This
fires at least 6 times in luxmark

https://reviews.llvm.org/D158908


  Commit: 699685b7185bfe196a6ae24df6daa9f68c79148e
      https://github.com/llvm/llvm-project/commit/699685b7185bfe196a6ae24df6daa9f68c79148e
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-09-01 (Fri, 01 Sep 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pow.ll

  Log Message:
  -----------
  AMDGPU: Enable assumptions in AMDGPULibCalls

https://reviews.llvm.org/D159006


  Commit: dac8f974b51b076773ec49603df4e627f4d9089c
      https://github.com/llvm/llvm-project/commit/dac8f974b51b076773ec49603df4e627f4d9089c
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-09-01 (Fri, 01 Sep 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pow-codegen.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pow.ll

  Log Message:
  -----------
  AMDGPU: Handle sitofp and uitofp exponents in fast pow expansion

https://reviews.llvm.org/D158996


  Commit: deefda7074398b7e8b7dae9dace43a8c694a49c1
      https://github.com/llvm/llvm-project/commit/deefda7074398b7e8b7dae9dace43a8c694a49c1
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-09-01 (Fri, 01 Sep 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pow-codegen.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pow.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pown.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-powr.ll
    M llvm/test/CodeGen/AMDGPU/simplify-libcalls.ll

  Log Message:
  -----------
  AMDGPU: Use exp2 and log2 intrinsics directly for f16/f32

These codegen correctly but f64 doesn't. This prevents losing fast
math flags on the way to the underlying intrinsic.

https://reviews.llvm.org/D158997


  Commit: def228553cfd20155c3d5601ea3549b943612ed9
      https://github.com/llvm/llvm-project/commit/def228553cfd20155c3d5601ea3549b943612ed9
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-09-01 (Fri, 01 Sep 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
    M llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp
    M llvm/lib/Target/AMDGPU/AMDGPULibFunc.h
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pow-codegen.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pow.ll

  Log Message:
  -----------
  AMDGPU: Use pown instead of pow if known integral

https://reviews.llvm.org/D158998


  Commit: ee795fd1cf6ceb4963bf264df0dcfad006d96381
      https://github.com/llvm/llvm-project/commit/ee795fd1cf6ceb4963bf264df0dcfad006d96381
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-09-01 (Fri, 01 Sep 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pow.ll

  Log Message:
  -----------
  AMDGPU: Handle rounding intrinsic exponents in isKnownIntegral

https://reviews.llvm.org/D158999


Compare: https://github.com/llvm/llvm-project/compare/9e9be99c972e...ee795fd1cf6c


More information about the All-commits mailing list