[PATCH] D97996: [flang][fir] Add diagnostic tests for FIR ops verifier
Valentin Clement via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 4 18:44:20 PST 2021
clementval marked an inline comment as done.
clementval added inline comments.
================
Comment at: flang/lib/Optimizer/Dialect/FIROps.cpp:556
if (op.getShape()) {
- auto shapeTy = op.getShape().getType();
- if (!(shapeTy.isa<fir::ShapeType>() || shapeTy.isa<ShapeShiftType>()))
- return op.emitOpError("must be shape or shapeshift type");
if (!isArray)
return op.emitOpError("shape must not be provided for a scalar");
----------------
mehdi_amini wrote:
> Nit: you can merge now: `if (op.getShape() && !isArray)`
>
> (same below)
Good catch! Thanks.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97996/new/
https://reviews.llvm.org/D97996
More information about the llvm-commits
mailing list