AMDGPU: Fold undef fcanonicalize to qNaN
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 31 Jul 2018 13:34:31 +0000 (13:34 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 31 Jul 2018 13:34:31 +0000 (13:34 +0000)
commit4aec86d37a65758b2975a93d5f9c406a4610f052
tree86b90383c2c71788b1aff30be774ff3da9aa0d66
parent511fed8a24d321be41176cf246f6450d11342174
AMDGPU: Fold undef fcanonicalize to qNaN

We could choose a free 0 for this, but this
matches the behavior for fmul undef, 1.0. Also,
the NaN use is more useful for folding use operations
although if it's not eliminated it is more expensive
in terms of code size.

llvm-svn: 338376
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/test/CodeGen/AMDGPU/fcanonicalize.ll