[AMDGPU] Add custom lowering for llvm.log{,10}.{f16,f32} intrinsics
authorVedran Miletic <vedran@miletic.net>
Mon, 27 Nov 2017 13:26:38 +0000 (13:26 +0000)
committerVedran Miletic <vedran@miletic.net>
Mon, 27 Nov 2017 13:26:38 +0000 (13:26 +0000)
commitad21f2687dcca2199a5b2bd9b7f04486008ece16
treead28403580a0d767341bc72457e6f21523eb7dee
parent4c2c9c3620e3bed9cb6fa709ec3b3cc454eb5748
[AMDGPU] Add custom lowering for llvm.log{,10}.{f16,f32} intrinsics

AMDGPU backend errors with "unsupported call to function" upon
encountering a call to llvm.log{,10}.{f16,f32} intrinsics. This patch
adds custom lowering to avoid that error on both R600 and SI.

Reviewers: arsenm, jvesely

Subscribers: tstellar

Differential Revision: https://reviews.llvm.org/D29942

llvm-svn: 319025
llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h
llvm/test/CodeGen/AMDGPU/llvm.log.f16.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/llvm.log.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/llvm.log10.f16.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/llvm.log10.ll [new file with mode: 0644]