[SelectionDAG] Add fcmp UNDEF handling to SelectionDAG::FoldSetCC
commitb193fb3f223716f6334a73132a1c82ded24bfbc7
authorSimon Pilgrim <lvm-dev@redking.me.uk>
Fri, 5 Apr 2019 14:56:21 +0000 (5 14:56 +0000)
committerSimon Pilgrim <lvm-dev@redking.me.uk>
Fri, 5 Apr 2019 14:56:21 +0000 (5 14:56 +0000)
tree24cf512acd1bbb2e4ebf5b500184e0b18ec86d90
parent6bc7028ec62154f00a32bae587bd19a07dc1f53e
[SelectionDAG] Add fcmp UNDEF handling to SelectionDAG::FoldSetCC

Second half of PR40800, this patch adds DAG undef handling to fcmp instructions to match the behavior 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........

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357765 91177308-0d34-0410-b5e6-96231b3b80d8
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/SPARC/fp128.ll
test/CodeGen/X86/block-placement.ll
test/CodeGen/X86/fcmp-constant.ll