OSDN Git Service

AMDGPU: Generalize matching of v_med3_f32
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 31 Jan 2017 03:07:46 +0000 (03:07 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 31 Jan 2017 03:07:46 +0000 (03:07 +0000)
commit3b595d2304a3a0316b388406a7b10962e35d4b14
treea9fb8f3edc9dcdfbd65840c6b5f6fb2be2453405
parent6a569f570080d9a01cbda6d49f388ad94b867444
AMDGPU: Generalize matching of v_med3_f32

I think this is safe as long as no inputs are known to ever
be nans.

Also add an intrinsic for fmed3 to be able to handle all safe
math cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293598 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/IntrinsicsAMDGPU.td
lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
lib/Target/AMDGPU/AMDGPUInstructions.td
lib/Target/AMDGPU/SIISelLowering.cpp
lib/Target/AMDGPU/SIInstrInfo.td
lib/Target/AMDGPU/SIInstructions.td
test/CodeGen/AMDGPU/fmed3.ll
test/CodeGen/AMDGPU/llvm.amdgcn.fmed3.ll [new file with mode: 0644]