]> granicus.if.org Git - llvm/commit
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)
commit8f44f41e0f3c0714984307749b1891cdaaceb9ee
treec777c3d96e5bde8cf10fb3ca8bc2436bd9ea0abe
parent8d00765ed12418005856d03e9579d54f4b850620
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338376 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/SIISelLowering.cpp
test/CodeGen/AMDGPU/fcanonicalize.ll