[all-commits] [llvm/llvm-project] 07d164: [Attributor][FIX] Do not try to cast if a cast is ...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Fri Nov 1 22:54:48 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 07d16424f28482a852a35bd817189d4dfb1701ef
      https://github.com/llvm/llvm-project/commit/07d16424f28482a852a35bd817189d4dfb1701ef
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2019-11-02 (Sat, 02 Nov 2019)

  Changed paths:
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/test/Transforms/IPConstantProp/PR43857.ll

  Log Message:
  -----------
  [Attributor][FIX] Do not try to cast if a cast is not required

When we replace constant returns at the call site we did issue a cast in
the hopes it would be a no-op if the types are equal. Turns out that is
not the case and we have to check it ourselves first.

Reused an IPConstantProp test for coverage. No functional change to the
test wrt. IPConstantProp.




More information about the All-commits mailing list