This depends on D102107 and unblocks the failing amdgcn runtime
tests in the latter.
There seems to be some issue with function pointers handling
in the middle/back end. Removing optnone attribute makes the
optimizer to replace indirect call with direct call.