[all-commits] [llvm/llvm-project] b326d4: [SelectionDAG] Don't remove unused negated constan...

Qiu Chaofan via All-commits all-commits at lists.llvm.org
Mon Oct 5 10:17:11 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b326d4ff946d2061a566a3fcce9f33b484759fe0
      https://github.com/llvm/llvm-project/commit/b326d4ff946d2061a566a3fcce9f33b484759fe0
  Author: Qiu Chaofan <qiucofan at cn.ibm.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
    M llvm/test/CodeGen/X86/pr47517.ll

  Log Message:
  -----------
  [SelectionDAG] Don't remove unused negated constant immediately

This reverts partial of a2fb5446 (actually, 2508ef01) about removing
negated FP constant immediately if it has no uses. However, as discussed
in bug 47517, there're cases when NegX is folded into constant from
other places while NegY is removed by that line of code and NegX is
equal to NegY. In these cases, NegX is deleted before used and crash
happens. So revert the code and add necessary test case.




More information about the All-commits mailing list