[PATCH] D62807: [SelectionDAG] Add [us]itofp(undef) --> 0 constant fold (PR39205)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 05:28:45 PDT 2019


RKSimon created this revision.
RKSimon added reviewers: spatel, craig.topper, efriedma, jonpa, uweigand.
Herald added a project: LLVM.

We were missing this fold in the DAG, which I've copied directly from llvm::ConstantFoldCastInstruction

I've had to tweak the systemz reduced test case to prevent it folding away but the x86 test cases are all examples of the extra scalar conversions reported in PR39205


Repository:
  rL LLVM

https://reviews.llvm.org/D62807

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  test/CodeGen/SystemZ/subregliveness-02.ll
  test/CodeGen/X86/avx512-cvt-widen.ll
  test/CodeGen/X86/avx512-cvt.ll
  test/CodeGen/X86/vec_int_to_fp-widen.ll
  test/CodeGen/X86/vec_int_to_fp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62807.202692.patch
Type: text/x-patch
Size: 28900 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190603/958083fb/attachment-0001.bin>


More information about the llvm-commits mailing list