uabelho added a comment. Thanks Jun, this indeed solves PR37323. I've no idea if this is the best way to solve the problem though so it would be good with some opinion from Davide or Daniel. https://reviews.llvm.org/D46775