At the moment, llvm.is.constant intrinsics with non-constant arguments get expanded
during SelectionDAG preparation in the default pass order. This means that they are
expanded are the last instance of SimplifyCFG and don't result in pruning of dead
branches. This breaks when the dead branches contain assembler statements that
depends on immediate arguments. This is the middle end side of the fixes for PR41027.
This patch extends the InstSimplify pass to do this expansion as it is the last generic
simplification pass before the final SimplifyCFG and already iterating all instructions