[AMDGPU] Avoid calling copyFastMathFlags in wrong context
authorPiotr Sobczak <Piotr.Sobczak@amd.com>
Wed, 16 Dec 2020 09:12:54 +0000 (10:12 +0100)
committerPiotr Sobczak <Piotr.Sobczak@amd.com>
Wed, 16 Dec 2020 09:22:51 +0000 (10:22 +0100)
commitc7afb698caf00f0ad0b479f7d2869c119aa3482e
tree884f733c2c5830e640ffd5a4022af82a810fcc5e
parentf141d1afc5068d5c5e2c47e25a5d4b4914116b92
[AMDGPU] Avoid calling copyFastMathFlags in wrong context

Calling Instruction::copyFastMathFlags() assumes the caller is
FPMathOperator. Avoid calling the function for instructions
that are not instances of FPMathOperator.
llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp