[all-commits] [llvm/llvm-project] 5fa87e: [AMDGPU] Try to determine sign bit during div/rem ...

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri May 8 01:11:47 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5fa87ec004fd8a493ee6799ee5ba81b1c82daf19
      https://github.com/llvm/llvm-project/commit/5fa87ec004fd8a493ee6799ee5ba81b1c82daf19
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp

  Log Message:
  -----------
  [AMDGPU] Try to determine sign bit during div/rem expansion

This is preparation for D79294, which removes an expensive
InstSimplify optimization, on the assumption that it will be
picked up by InstCombine instead. Of course, this does not hold
up if a backend performs non-trivial IR expansions without running
a canonicalization pipeline afterwards, which turned up as an
issue in the context of AMDGPU div/rem expansion.

This patch mitigates the issue by explicitly performing a known
bits calculation where it matters. No test changes, as those would
only be visible after the other patch lands.

Differential Revision: https://reviews.llvm.org/D79596




More information about the All-commits mailing list