This is an archive of the discontinued LLVM Phabricator instance.

[mlir] fixed invalid LLVM intrinsics in LLVMOPs.td and llvmir-intrinsics.mlir.
ClosedPublic

Authored by dfki-jugr on Jan 27 2020, 6:21 AM.

Details

Summary

The intrinsic operation added multiple type annotations to the llvm intrinsic operations, but only one is needed.
The related tests in llvmir-intrinsics.mlir checked the wrong number and are adjusted as well.

Diff Detail

Event Timeline

dfki-jugr created this revision.Jan 27 2020, 6:21 AM
ftynse requested changes to this revision.Jan 27 2020, 6:30 AM
ftynse added a subscriber: ftynse.

I suppose that, in general, there is no strict correspondance between the number of type suffixes in an overloaded intrinsic and the number of operands. So having one type may make sense for fmuladd, but may not make sense for some platform-specific vector select-like intrinsic with three arguments that would require two types. I would suggest renaming BinaryIntrinsicOp to BinarySameArgsIntrinsicOp if you do this change. Or even dropping it entirely and keeping an explicit definition for copysign and fmuladd since I don't see any other users of the Binary and TernaryIntrinsicOp classes.

This revision now requires changes to proceed.Jan 27 2020, 6:30 AM

Unit tests: pass. 62198 tests passed, 0 failed and 815 were skipped.

clang-tidy: pass.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.

dfki-jugr updated this revision to Diff 240582.Jan 27 2020, 7:38 AM

Renamed BinaryIntrinsicOp to BinarySameArgsIntrinsicOp.
Renamed TernaryIntrinsicOp to TernarySameArgsIntrinsicOp.

ftynse accepted this revision.Jan 27 2020, 7:46 AM
ftynse retitled this revision from Fixed invalid LLVM intrinsics in LLVMOPs.td and llvmir-intrinsics.mlir. to [mlir] fixed invalid LLVM intrinsics in LLVMOPs.td and llvmir-intrinsics.mlir..

Thanks!

Please note that we tend to prefix the header of the commit message with [mlir] so that people on llvm-commits@ can understand the changes are restricted to MLIR (many more people might have a say if actual LLVM IR intrinsics were broken)

This revision is now accepted and ready to land.Jan 27 2020, 7:47 AM

Unit tests: pass. 62198 tests passed, 0 failed and 815 were skipped.

clang-tidy: pass.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.

This revision was automatically updated to reflect the committed changes.