[llvm] [OpenMP] [IR Builder] Changes to Support Scan Operation (PR #136035)
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 13 14:45:04 PDT 2025
================
@@ -5349,6 +5350,100 @@ TEST_F(OpenMPIRBuilderTest, CreateReductions) {
EXPECT_TRUE(findGEPZeroOne(ReductionFn->getArg(1), FirstRHS, SecondRHS));
}
+void createScan(llvm::Value *scanVar, llvm::Type *scanType,
+ OpenMPIRBuilder &OMPBuilder, IRBuilder<> &Builder,
+ OpenMPIRBuilder::LocationDescription Loc,
+ OpenMPIRBuilder::InsertPointTy &allocaIP) {
+ using InsertPointTy = OpenMPIRBuilder::InsertPointTy;
+ ASSERT_EXPECTED_INIT(
+ InsertPointTy, retIp,
+ OMPBuilder.createScan(Loc, allocaIP, {scanVar}, {scanType}, true));
+ Builder.restoreIP(retIp);
+}
+
+TEST_F(OpenMPIRBuilderTest, ScanReduction) {
----------------
Meinersbur wrote:
Could you add some pseudocode of what this function builds?
https://github.com/llvm/llvm-project/pull/136035
More information about the llvm-commits
mailing list