[all-commits] [llvm/llvm-project] 45555c: [InstSimplify] Simplify calls with "returned" attr...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Mar 9 10:54:14 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 45555c381926050bc45a3372b1af0e15650371b6
      https://github.com/llvm/llvm-project/commit/45555c381926050bc45a3372b1af0e15650371b6
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-03-09 (Mon, 09 Mar 2020)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/test/Analysis/ValueTracking/known-nonnull-at.ll
    M llvm/test/Transforms/InstCombine/align-attr.ll
    M llvm/test/Transforms/InstCombine/expensive-combines.ll
    M llvm/test/Transforms/InstCombine/fortify-folding.ll
    M llvm/test/Transforms/InstCombine/strcpy_chk-1.ll
    M llvm/test/Transforms/InstCombine/strncpy_chk-1.ll
    M llvm/test/Transforms/InstCombine/unused-nonnull.ll
    M llvm/test/Transforms/InstSimplify/call.ll

  Log Message:
  -----------
  [InstSimplify] Simplify calls with "returned" attribute

If a call argument has the "returned" attribute, we can simplify
the call to the value of that argument. The "-inst-simplify" pass
already handled this for the constant integer argument case via
known bits, which is invoked in SimplifyInstruction. However,
non-constant (or non-int) arguments are not handled at all right now.

This addresses one of the regressions from D75801.

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




More information about the All-commits mailing list