[PATCH] D113014: [fir] Add fir.zero_bits conversion pattern to LLVM IR dialect
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 2 16:26:54 PDT 2021
mehdi_amini added inline comments.
================
Comment at: flang/lib/Optimizer/CodeGen/CodeGen.cpp:188
+ return zero.emitOpError(
+ "conversion of fir.zero with aggregate type not implemented yet");
+ }
----------------
Nit: in general Patterns aren't supposed to emit errors directly but to wrap the message in notifyFailure(...).
The conversion may still succeed if another pattern ends up folding this op (or matching it), so having an error can be confusing.
In general if we want end-use diagnostic, it is best to use other mechanism (like using the partial conversion which has an extra argument for collecting "unconvertedOps").
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113014/new/
https://reviews.llvm.org/D113014
More information about the llvm-commits
mailing list