[PATCH] D113091: [fir] Use notifyMatchFailure in fir.zero_bits conversion
Valentin Clement via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 3 12:45:34 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG52d813edcc78: [fir] Use notifyMatchFailure in fir.zero_bits conversion (authored by clementval).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113091/new/
https://reviews.llvm.org/D113091
Files:
flang/lib/Optimizer/CodeGen/CodeGen.cpp
flang/test/Fir/convert-to-llvm-invalid.fir
Index: flang/test/Fir/convert-to-llvm-invalid.fir
===================================================================
--- flang/test/Fir/convert-to-llvm-invalid.fir
+++ flang/test/Fir/convert-to-llvm-invalid.fir
@@ -3,7 +3,6 @@
// RUN: fir-opt --split-input-file --fir-to-llvm-ir --verify-diagnostics %s
func @zero_aggregate() {
- // expected-error at +2{{'fir.zero_bits' op conversion of fir.zero with aggregate type not implemented yet}}
// expected-error at +1{{failed to legalize operation 'fir.zero_bits'}}
%a = fir.zero_bits !fir.array<10xf32>
return
Index: flang/lib/Optimizer/CodeGen/CodeGen.cpp
===================================================================
--- flang/lib/Optimizer/CodeGen/CodeGen.cpp
+++ flang/lib/Optimizer/CodeGen/CodeGen.cpp
@@ -196,7 +196,8 @@
zero, ty, mlir::FloatAttr::get(zero.getType(), 0.0));
} else {
// TODO: create ConstantAggregateZero for FIR aggregate/array types.
- return zero.emitOpError(
+ return rewriter.notifyMatchFailure(
+ zero,
"conversion of fir.zero with aggregate type not implemented yet");
}
return success();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113091.384561.patch
Type: text/x-patch
Size: 1143 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211103/44d9decd/attachment.bin>
More information about the llvm-commits
mailing list