[all-commits] [llvm/llvm-project] 45b259: [SimplifyLibCalls] Skip unused calls in sincos tra...

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Jan 22 11:57:35 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 45b259f99509dda6820e09369d84c21d4ea33bcd
      https://github.com/llvm/llvm-project/commit/45b259f99509dda6820e09369d84c21d4ea33bcd
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-01-22 (Fri, 22 Jan 2021)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp

  Log Message:
  -----------
  [SimplifyLibCalls] Skip unused calls in sincos transform

If the call result is unused, we should let it get DCEd rather
than replacing it. Also, don't try to replace an existing sincos
with another one (unless it's as part of combining sin and cos).

This avoids an infinite combine loop if the calls are not DCEd
as expected, which can happen with D94106 and lack of willreturn
annotation in hand-crafted IR.




More information about the All-commits mailing list