[PATCH] D60006: [SelectionDAG] Add fcmp UNDEF handling to SelectionDAG::FoldSetCC

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 29 12:00:12 PDT 2019


RKSimon created this revision.
RKSimon added reviewers: spatel, efriedma, lebedev.ri, craig.topper, t.p.northover, kparzysz, uweigand, atanasyan.
Herald added subscribers: jdoerfert, jrtc27, fedor.sergeev, javed.absar, sdardis, jyknight.
Herald added a project: LLVM.

Second half of PR40800, this patch adds DAG undef handling to fcmp instructions to match the behaviour in llvm::ConstantFoldCompareInstruction, this permits constant folding of vector comparisons where some elements had been reduced to UNDEF (by SimplifyDemandedVectorElts etc.).

This involves a lot of tweaking to reduced tests as bugpoint loves to reduce fcmp arguments to undef........

I've gone through these tests best I can, and AFAICT I haven't changed their purposes in any critical way - many are fragile and difficult to reduce from scratch as they are often 5+ years old.... I'd appreciate it if the respective target specialists could check my changes.

While these pre-commit changes are getting approved, I'll start adding constant folding tests so we have proper coverage.


Repository:
  rL LLVM

https://reviews.llvm.org/D60006

Files:
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  test/CodeGen/AArch64/half.ll
  test/CodeGen/ARM/fcmp-xo.ll
  test/CodeGen/ARM/fp16-instructions.ll
  test/CodeGen/ARM/vcge.ll
  test/CodeGen/Hexagon/autohvx/build-vector-i32-type.ll
  test/CodeGen/Mips/2013-11-18-fp64-const0.ll
  test/CodeGen/SPARC/fp128.ll
  test/CodeGen/SystemZ/DAGCombiner_illegal_BUILD_VECTOR.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60006.192880.patch
Type: text/x-patch
Size: 15861 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190329/1da3c11c/attachment.bin>


More information about the llvm-commits mailing list