[PATCH] D64713: [InstCombine] X *fast (C ? 1.0 : 0.0) -> C ? X : 0.0
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 9 01:44:33 PST 2019
foad marked an inline comment as done.
foad added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:791-801
+ } else if (LHSIsSelect && LHS->hasOneUse()) {
+ // (A ? B : C) op Y -> A ? (B op Y) : (C op Y)
+ Cond = A;
+ True = SimplifyBinOp(Opcode, B, RHS, FMF, Q);
+ False = SimplifyBinOp(Opcode, C, RHS, FMF, Q);
+ } else if (RHSIsSelect && RHS->hasOneUse()) {
+ // X op (D ? E : F) -> D ? (X op E) : (X op F)
----------------
spatel wrote:
> Is it correct that everything outside of lines 791-801 is functionally identical to before? If so, please pre-commit that part as NFC.
Yes, done: d162e02cee74
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64713/new/
https://reviews.llvm.org/D64713
More information about the llvm-commits
mailing list