Skip to content

Commit a27597e

Browse files
clementvalkcloudy0717
authored andcommitted
[flang][cuda] Use the option to populate conversion patterns (llvm#170190)
llvm#169740 split the conversion patterns but the option was not use when populating them.
1 parent c833cb4 commit a27597e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

flang/lib/Optimizer/Transforms/CUFOpConversion.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,8 +557,9 @@ class CUFOpConversion : public fir::impl::CUFOpConversionBase<CUFOpConversion> {
557557
target.addLegalOp<cuf::StreamCastOp>();
558558
cuf::populateCUFToFIRConversionPatterns(typeConverter, *dl, symtab,
559559
patterns);
560-
cuf::populateCUFAllocationConversionPatterns(typeConverter, *dl, symtab,
561-
patterns);
560+
if (allocationConversion)
561+
cuf::populateCUFAllocationConversionPatterns(typeConverter, *dl, symtab,
562+
patterns);
562563
if (mlir::failed(mlir::applyPartialConversion(getOperation(), target,
563564
std::move(patterns)))) {
564565
mlir::emitError(mlir::UnknownLoc::get(ctx),

0 commit comments

Comments
 (0)