[PATCH] D113442: [InstCombine] Enable fold select into operand for FAdd, FMul, and FSub.
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 9 05:50:28 PST 2021
spatel added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/select-binop-cmp.ll:330
+ %B = fadd float %x, %z
+ %C = select i1 %A, float %B, float %z
+ ret float %C
----------------
spatel wrote:
> Why is the compare constant (0.0 or -0.0) relevant for this fold?
>
> The true/false operands should be swapped so we have coverage for the pattern that replaces the true value with a constant. Similarly for `fmul`, there should be two tests.
A better question might be - why is there an fcmp in any of these tests? That isn't part of the minimal pattern is it?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113442/new/
https://reviews.llvm.org/D113442
More information about the llvm-commits
mailing list