This is the motivated case:
define double @test(double %a, double %b, double %c, double %d) { entry: %cmp = fcmp fast oeq double %a, %b %cond = select fast i1 %cmp, double %c, double %d ret double %cond }
We are now using cmp + branch for this case. It could be improved with cmp + xxsel which is explicit suggested by Power ISA programming node.
Programming Note xscmpeqdp can be used to implement the C/C++/Java conditional operation, RESULT = (x==y) ? a : b. xscmpeqdp fEQ,fX,fY xxsel fRESULT,fA,fB,fEQ