[PATCH] D38288: [InstCombine] Restrict transforming shared selects using SimplifySelectsFeedingBinaryOp when we cannot simplify the binary op.
Chad Rosier via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 26 15:31:28 PDT 2017
mcrosier added a comment.
I think we're on the right track, but what about this test?
declare void @use_float(double)
define float @test3(i1 zeroext %arg) #0 {
%tmp = select i1 %arg, float 5.000000e+00, float 6.000000e+00
%tmp1 = select i1 %arg, float 1.000000e+00, float 9.000000e+00
%tmp2 = fmul float %tmp, %tmp1
call void @use_double(double %tmp)
ret float %tmp2
}
I think we still want to transform this case (because we'll replace the fmul with a select) even though the first select has multiple uses.
https://reviews.llvm.org/D38288
More information about the llvm-commits
mailing list