InstCombine: Add constant folding/simplify for amdgcn.ldexp intrinsic
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 21 May 2020 16:31:28 +0000 (12:31 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 22 May 2020 12:21:38 +0000 (08:21 -0400)
commit88c20fa3d2a25ea1319c78cb1173532511879cfc
treea275dbe804f0495a732dc9ddbb4129032c66a336
parent5a8db275f8fc8ee19b184f831bda1cdfc6771776
InstCombine: Add constant folding/simplify for amdgcn.ldexp intrinsic

This really belongs in InstructionSimplify since it doesn't introduce
new instructions. Put it in instcombine to avoid increasing the number
of passes considering target intrinsics.

I also noticed that we seem to now be interpreting strictfp attributes
on call sites, so try to handle that.
llvm/lib/Analysis/ConstantFolding.cpp
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/test/Transforms/InstCombine/AMDGPU/ldexp.ll [new file with mode: 0644]