[PATCH] D131672: [instcombine] Optimise for zero initialisation of product given finite math in Clang
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 12 04:55:08 PDT 2022
spatel added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp:1476
+ if (phiAllConstantOperandsAreZero(PN)) {
+ for (Value *Operands : PN.operands()) {
+ if (Instruction *Fmul = dyn_cast<Instruction>(Operands)) {
----------------
Can we use llvm::matchSimpleRecurrence()?
Here's an example usage within instcombine:
https://github.com/llvm/llvm-project/blob/1828c75d5f4ff657cf977476091fa224c8193e1d/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp#L2201
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131672/new/
https://reviews.llvm.org/D131672
More information about the llvm-commits
mailing list