diff --git a/polygeist/tools/cgeist/Lib/CGExpr.cc b/polygeist/tools/cgeist/Lib/CGExpr.cc index 6baec766d4e3d..ebd229628242c 100644 --- a/polygeist/tools/cgeist/Lib/CGExpr.cc +++ b/polygeist/tools/cgeist/Lib/CGExpr.cc @@ -29,6 +29,10 @@ using namespace mlir; extern llvm::cl::opt GenerateAllSYCLFuncs; +static llvm::cl::opt + OmitFPContract("omit-fp-contract", llvm::cl::init(false), + llvm::cl::desc("Do not contract FP operations")); + ValueCategory MLIRScanner::VisitExtVectorElementExpr(clang::ExtVectorElementExpr *Expr) { auto Base = Visit(Expr->getBase()); @@ -2101,13 +2105,16 @@ ValueCategory MLIRScanner::VisitBinAssign(BinaryOperator *E) { class BinOpInfo { public: BinOpInfo(ValueCategory LHS, ValueCategory RHS, QualType Ty, - BinaryOperator::Opcode Opcode, const Expr *Expr) - : LHS(LHS), RHS(RHS), Ty(Ty), Opcode(Opcode), E(Expr) {} + BinaryOperator::Opcode Opcode, FPOptions FPFeatures, + const Expr *Expr) + : LHS(LHS), RHS(RHS), Ty(Ty), Opcode(Opcode), FPFeatures(FPFeatures), + E(Expr) {} ValueCategory getLHS() const { return LHS; } ValueCategory getRHS() const { return RHS; } constexpr QualType getType() const { return Ty; } constexpr BinaryOperator::Opcode getOpcode() const { return Opcode; } + FPOptions getFPFeatures() const { return FPFeatures; } constexpr const Expr *getExpr() const { return E; } private: @@ -2115,9 +2122,62 @@ class BinOpInfo { const ValueCategory RHS; const QualType Ty; // Computation Type. const BinaryOperator::Opcode Opcode; // Opcode of BinOp to perform + FPOptions FPFeatures; const Expr *E; }; +// Check whether it would be legal to emit a `math.fma` operation to represent +// op and if so, build the fmuladd. +// +// Checks that (a) the operation is fusable, and (b) -ffp-contract=on. +static std::optional tryEmitFMulAdd(const BinOpInfo &Op, + OpBuilder &Builder, + Location Loc, + bool IsSub = false) { + const BinaryOperator::Opcode Opcode = Op.getOpcode(); + + assert((Opcode == BO_Add || Opcode == BO_AddAssign || Opcode == BO_Sub || + Opcode == BO_SubAssign) && + "Only fadd/fsub can be the root of an fmuladd."); + + // Check whether this op is marked as fusable and fusion is allowed. + if (OmitFPContract || !Op.getFPFeatures().allowFPContractWithinStatement()) + return {}; + + // Peek through fneg to look for fmul. Make sure fneg has no users, and that + // it is the only use of its operand. + constexpr auto isNegOperand = + [](ValueCategory Val) -> std::pair { + auto Op = Val.val.getDefiningOp(); + if (Op && Val.val.use_empty()) { + Value Operand = Op.getOperand(); + if (Operand.hasOneUse()) + return {ValueCategory(Operand, /*IsReference=*/false), true}; + } + return {Val, false}; + }; + auto [LHS, NegLHS] = isNegOperand(Op.getLHS()); + auto [RHS, NegRHS] = isNegOperand(Op.getRHS()); + + // We have a potentially fusable op. Look for a mul on one of the operands. + // Also, make sure that the mul result isn't used directly. In that case, + // there's no point creating a muladd operation. + constexpr auto tryEmit = [](OpBuilder &Builder, Location Loc, + ValueCategory Original, ValueCategory LHS, + ValueCategory RHS, bool NegLHS, bool NegMul, + bool NegAdd) -> std::optional { + auto LHSOp = LHS.val.getDefiningOp(); + if (LHSOp && (LHS.val.use_empty() || NegLHS)) + return LHS.FMA(Builder, Loc, RHS, NegMul, NegAdd); + return {}; + }; + std::optional Res = + tryEmit(Builder, Loc, Op.getLHS(), LHS, RHS, NegLHS, NegLHS, IsSub); + return Res ? Res + : tryEmit(Builder, Loc, Op.getRHS(), RHS, LHS, NegRHS, + IsSub ^ NegRHS, false); +} + ValueCategory MLIRScanner::EmitPromoted(Expr *E, QualType PromotionType) { assert(E && "Invalid input expression."); E = E->IgnoreParens(); @@ -2612,7 +2672,9 @@ std::pair MLIRScanner::EmitCompoundAssignLValue( LHS = EmitScalarConversion(LHS, LHSTy, E->getComputationLHSType(), Loc); // Expand the binary operator. - ValueCategory Result = (this->*Func)({LHS, RHS, Ty, OpCode, E}); + ValueCategory Result = + (this->*Func)({LHS, RHS, Ty, OpCode, + E->getFPFeaturesInEffect(Glob.getCGM().getLangOpts()), E}); // Convert the result back to the LHS type, // potentially with Implicit Conversion sanitizer check. Result = EmitScalarConversion(Result, PromotionTypeCR, LHSTy, Loc); @@ -2669,7 +2731,12 @@ BinOpInfo MLIRScanner::EmitBinOps(BinaryOperator *E, QualType PromotionType) { const ValueCategory RHS = EmitPromotedScalarExpr(E->getRHS(), PromotionType); const QualType Ty = !PromotionType.isNull() ? PromotionType : E->getType(); const BinaryOperator::Opcode Opcode = E->getOpcode(); - return {LHS, RHS, Ty, Opcode, E}; + return {LHS, + RHS, + Ty, + Opcode, + E->getFPFeaturesInEffect(Glob.getCGM().getLangOpts()), + E}; } static void informNoOverflowCheck(LangOptions::SignedOverflowBehaviorTy SOB, @@ -2900,8 +2967,10 @@ ValueCategory MLIRScanner::EmitBinAdd(const BinOpInfo &Info) { assert(!Info.getType()->isConstantMatrixType() && "Not yet implemented"); - if (mlirclang::isFPOrFPVectorTy(LHS.val.getType())) - return LHS.FAdd(Builder, Loc, RHS.val); + if (mlirclang::isFPOrFPVectorTy(LHS.val.getType())) { + std::optional FMulAdd = tryEmitFMulAdd(Info, Builder, Loc); + return FMulAdd ? *FMulAdd : LHS.FAdd(Builder, Loc, RHS.val); + } return LHS.Add(Builder, Loc, RHS.val); } @@ -2919,8 +2988,11 @@ ValueCategory MLIRScanner::EmitBinSub(const BinOpInfo &Info) { return LHS.Sub(Builder, Loc, RHS.val); } assert(!Info.getType()->isConstantMatrixType() && "Not yet implemented"); - if (mlirclang::isFPOrFPVectorTy(LHS.val.getType())) - return LHS.FSub(Builder, Loc, RHS.val); + if (mlirclang::isFPOrFPVectorTy(LHS.val.getType())) { + std::optional FMulAdd = + tryEmitFMulAdd(Info, Builder, Loc, /*IsSub=*/true); + return FMulAdd ? *FMulAdd : LHS.FSub(Builder, Loc, RHS.val); + } return LHS.Sub(Builder, Loc, RHS.val); } @@ -3103,7 +3175,8 @@ ValueCategory MLIRScanner::VisitMinus(UnaryOperator *E, const ValueCategory Zero = ValueCategory::getNullValue(Builder, Loc, Op.val.getType()); return EmitBinSub( - BinOpInfo{Zero, Op, E->getType(), BinaryOperator::Opcode::BO_Sub, E}); + BinOpInfo{Zero, Op, E->getType(), BinaryOperator::Opcode::BO_Sub, + E->getFPFeaturesInEffect(Glob.getCGM().getLangOpts()), E}); } ValueCategory MLIRScanner::VisitImag(UnaryOperator *E, QualType PromotionType) { diff --git a/polygeist/tools/cgeist/Lib/ValueCategory.cc b/polygeist/tools/cgeist/Lib/ValueCategory.cc index 5a628bf2efd22..a80b8bfe1cefb 100644 --- a/polygeist/tools/cgeist/Lib/ValueCategory.cc +++ b/polygeist/tools/cgeist/Lib/ValueCategory.cc @@ -8,6 +8,7 @@ #include "ValueCategory.h" #include "Lib/TypeUtils.h" +#include "mlir/Dialect/Math/IR/Math.h" #include "mlir/Dialect/Polygeist/IR/PolygeistOps.h" #include "mlir/Dialect/Vector/IR/VectorOps.h" #include "mlir/Support/LLVM.h" @@ -804,6 +805,26 @@ ValueCategory ValueCategory::FAdd(OpBuilder &Builder, Location Loc, return FPBinOp(Builder, Loc, val, RHS); } +ValueCategory ValueCategory::FMA(OpBuilder &Builder, Location Loc, + ValueCategory Addend, bool NegMul, + bool NegAdd) const { + auto MulOp = val.getDefiningOp(); + + assert(MulOp && "Expecting arith.mul operation"); + + Value MulOp0 = MulOp.getLhs(); + Value MulOp1 = MulOp.getRhs(); + if (NegMul) + MulOp0 = + ValueCategory(MulOp0, /*IsReference=*/false).FNeg(Builder, Loc).val; + if (NegAdd) + Addend = Addend.FNeg(Builder, Loc); + + return ValueCategory( + Builder.create(Loc, MulOp0, MulOp1, Addend.val), + /*IsReference=*/false); +} + ValueCategory ValueCategory::CAdd(OpBuilder &Builder, Location Loc, Value RHS) const { assert(isComplexRepresentation(val.getType()) && diff --git a/polygeist/tools/cgeist/Lib/ValueCategory.h b/polygeist/tools/cgeist/Lib/ValueCategory.h index 414bef496e869..08b9b4804c55e 100644 --- a/polygeist/tools/cgeist/Lib/ValueCategory.h +++ b/polygeist/tools/cgeist/Lib/ValueCategory.h @@ -180,6 +180,8 @@ class ValueCategory { bool HasNSW = false) const; ValueCategory FAdd(mlir::OpBuilder &Builder, mlir::Location Loc, mlir::Value RHS) const; + ValueCategory FMA(mlir::OpBuilder &Builder, mlir::Location Loc, + ValueCategory Addend, bool NegMul, bool NegAdd) const; ValueCategory Sub(mlir::OpBuilder &Builder, mlir::Location Loc, mlir::Value RHS, bool HasNUW = false, bool HasNSW = false) const; diff --git a/polygeist/tools/cgeist/Test/Verification/fmuladd.cpp b/polygeist/tools/cgeist/Test/Verification/fmuladd.cpp new file mode 100644 index 0000000000000..379d848009ce2 --- /dev/null +++ b/polygeist/tools/cgeist/Test/Verification/fmuladd.cpp @@ -0,0 +1,171 @@ +// RUN: cgeist -w -o - -S --function=* %s | FileCheck %s +// RUN: cgeist -omit-fp-contract -w -o - -S --function=* %s | FileCheck %s --check-prefix=CHECK-OMIT + +// COM: -omit-fp-contract should yield no 'math.fma' operations + +// CHECK-OMIT-NOT: math.fma + +using double2 = double __attribute__((ext_vector_type(2))); + +template +T test_simple_lhs(T a, T b, T c) { + return a * b + c; +} + +template +T test_negmul_lhs(T a, T b, T c) { + return -(a * b) + c; +} + +template +T test_negadd_lhs(T a, T b, T c) { + return a * b - c; +} + +template +T test_negmul_negadd_lhs(T a, T b, T c) { + return -(a * b) - c; +} + +template +T test_simple_rhs(T a, T b, T c) { + return a + b * c; +} + +template +T test_negmul_rhs(T a, T b, T c) { + return a + -(b * c); +} + +template +T test_negadd_rhs(T a, T b, T c) { + return a - b * c; +} + +template +T test_negmul_negadd_rhs(T a, T b, T c) { + return a - -(b * c); +} + +#define TEST_TYPE(type) \ + template type test_simple_lhs(type a, type b, type c); \ + template type test_negmul_lhs(type a, type b, type c); \ + template type test_negadd_lhs(type a, type b, type c); \ + template type test_negmul_negadd_lhs(type a, type b, type c); \ + template type test_simple_rhs(type a, type b, type c); \ + template type test_negmul_rhs(type a, type b, type c); \ + template type test_negadd_rhs(type a, type b, type c); \ + template type test_negmul_negadd_rhs(type a, type b, type c); + +TEST_TYPE(float) + +// CHECK-LABEL: func.func @_Z15test_simple_lhsIfET_S0_S0_S0_( +// CHECK-SAME: %[[VAL_0:.*]]: f32, %[[VAL_1:.*]]: f32, +// CHECK-SAME: %[[VAL_2:.*]]: f32) -> f32 +// CHECK: %[[VAL_3:.*]] = math.fma %[[VAL_0]], %[[VAL_1]], %[[VAL_2]] : f32 +// CHECK: return %[[VAL_3]] : f32 +// CHECK: } + +// CHECK-LABEL: func.func @_Z15test_negmul_lhsIfET_S0_S0_S0_( +// CHECK-SAME: %[[VAL_0:.*]]: f32, %[[VAL_1:.*]]: f32, %[[VAL_2:.*]]: f32) -> f32 +// CHECK: %[[VAL_3:.*]] = arith.negf %[[VAL_0]] : f32 +// CHECK: %[[VAL_4:.*]] = math.fma %[[VAL_3]], %[[VAL_1]], %[[VAL_2]] : f32 +// CHECK: return %[[VAL_4]] : f32 +// CHECK: } + +// CHECK-LABEL: func.func @_Z15test_negadd_lhsIfET_S0_S0_S0_( +// CHECK-SAME: %[[VAL_0:.*]]: f32, %[[VAL_1:.*]]: f32, %[[VAL_2:.*]]: f32) -> f32 +// CHECK: %[[VAL_3:.*]] = arith.negf %[[VAL_2]] : f32 +// CHECK: %[[VAL_4:.*]] = math.fma %[[VAL_0]], %[[VAL_1]], %[[VAL_3]] : f32 +// CHECK: return %[[VAL_4]] : f32 +// CHECK: } + +// CHECK-LABEL: func.func @_Z22test_negmul_negadd_lhsIfET_S0_S0_S0_( +// CHECK-SAME: %[[VAL_0:.*]]: f32, %[[VAL_1:.*]]: f32, %[[VAL_2:.*]]: f32) -> f32 +// CHECK: %[[VAL_3:.*]] = arith.negf %[[VAL_0]] : f32 +// CHECK: %[[VAL_4:.*]] = arith.negf %[[VAL_2]] : f32 +// CHECK: %[[VAL_5:.*]] = math.fma %[[VAL_3]], %[[VAL_1]], %[[VAL_4]] : f32 +// CHECK: return %[[VAL_5]] : f32 +// CHECK: } + +// CHECK-LABEL: func.func @_Z15test_simple_rhsIfET_S0_S0_S0_( +// CHECK-SAME: %[[VAL_0:.*]]: f32, %[[VAL_1:.*]]: f32, %[[VAL_2:.*]]: f32) -> f32 +// CHECK: %[[VAL_3:.*]] = math.fma %[[VAL_1]], %[[VAL_2]], %[[VAL_0]] : f32 +// CHECK: return %[[VAL_3]] : f32 +// CHECK: } + +// CHECK-LABEL: func.func @_Z15test_negmul_rhsIfET_S0_S0_S0_( +// CHECK-SAME: %[[VAL_0:.*]]: f32, %[[VAL_1:.*]]: f32, %[[VAL_2:.*]]: f32) -> f32 +// CHECK: %[[VAL_3:.*]] = arith.negf %[[VAL_1]] : f32 +// CHECK: %[[VAL_4:.*]] = math.fma %[[VAL_3]], %[[VAL_2]], %[[VAL_0]] : f32 +// CHECK: return %[[VAL_4]] : f32 +// CHECK: } + +// CHECK-LABEL: func.func @_Z15test_negadd_rhsIfET_S0_S0_S0_( +// CHECK-SAME: %[[VAL_0:.*]]: f32, %[[VAL_1:.*]]: f32, %[[VAL_2:.*]]: f32) -> f32 +// CHECK: %[[VAL_3:.*]] = arith.negf %[[VAL_1]] : f32 +// CHECK: %[[VAL_4:.*]] = math.fma %[[VAL_3]], %[[VAL_2]], %[[VAL_0]] : f32 +// CHECK: return %[[VAL_4]] : f32 +// CHECK: } + +// CHECK-LABEL: func.func @_Z22test_negmul_negadd_rhsIfET_S0_S0_S0_( +// CHECK-SAME: %[[VAL_0:.*]]: f32, %[[VAL_1:.*]]: f32, %[[VAL_2:.*]]: f32) -> f32 +// CHECK: %[[VAL_3:.*]] = math.fma %[[VAL_1]], %[[VAL_2]], %[[VAL_0]] : f32 +// CHECK: return %[[VAL_3]] : f32 +// CHECK: } + +TEST_TYPE(double2) + +// CHECK-LABEL: func.func @_Z15test_simple_lhsIDv2_dET_S1_S1_S1_( +// CHECK-SAME: %[[VAL_0:.*]]: vector<2xf64>, %[[VAL_1:.*]]: vector<2xf64>, %[[VAL_2:.*]]: vector<2xf64>) -> vector<2xf64> +// CHECK: %[[VAL_3:.*]] = math.fma %[[VAL_0]], %[[VAL_1]], %[[VAL_2]] : vector<2xf64> +// CHECK: return %[[VAL_3]] : vector<2xf64> +// CHECK: } + +// CHECK-LABEL: func.func @_Z15test_negmul_lhsIDv2_dET_S1_S1_S1_( +// CHECK-SAME: %[[VAL_0:.*]]: vector<2xf64>, %[[VAL_1:.*]]: vector<2xf64>, %[[VAL_2:.*]]: vector<2xf64>) -> vector<2xf64> +// CHECK: %[[VAL_3:.*]] = arith.negf %[[VAL_0]] : vector<2xf64> +// CHECK: %[[VAL_4:.*]] = math.fma %[[VAL_3]], %[[VAL_1]], %[[VAL_2]] : vector<2xf64> +// CHECK: return %[[VAL_4]] : vector<2xf64> +// CHECK: } + +// CHECK-LABEL: func.func @_Z15test_negadd_lhsIDv2_dET_S1_S1_S1_( +// CHECK-SAME: %[[VAL_0:.*]]: vector<2xf64>, %[[VAL_1:.*]]: vector<2xf64>, %[[VAL_2:.*]]: vector<2xf64>) -> vector<2xf64> +// CHECK: %[[VAL_3:.*]] = arith.negf %[[VAL_2]] : vector<2xf64> +// CHECK: %[[VAL_4:.*]] = math.fma %[[VAL_0]], %[[VAL_1]], %[[VAL_3]] : vector<2xf64> +// CHECK: return %[[VAL_4]] : vector<2xf64> +// CHECK: } + +// CHECK-LABEL: func.func @_Z22test_negmul_negadd_lhsIDv2_dET_S1_S1_S1_( +// CHECK-SAME: %[[VAL_0:.*]]: vector<2xf64>, %[[VAL_1:.*]]: vector<2xf64>, %[[VAL_2:.*]]: vector<2xf64>) -> vector<2xf64> +// CHECK: %[[VAL_3:.*]] = arith.negf %[[VAL_0]] : vector<2xf64> +// CHECK: %[[VAL_4:.*]] = arith.negf %[[VAL_2]] : vector<2xf64> +// CHECK: %[[VAL_5:.*]] = math.fma %[[VAL_3]], %[[VAL_1]], %[[VAL_4]] : vector<2xf64> +// CHECK: return %[[VAL_5]] : vector<2xf64> +// CHECK: } + +// CHECK-LABEL: func.func @_Z15test_simple_rhsIDv2_dET_S1_S1_S1_( +// CHECK-SAME: %[[VAL_0:.*]]: vector<2xf64>, %[[VAL_1:.*]]: vector<2xf64>, %[[VAL_2:.*]]: vector<2xf64>) -> vector<2xf64> +// CHECK: %[[VAL_3:.*]] = math.fma %[[VAL_1]], %[[VAL_2]], %[[VAL_0]] : vector<2xf64> +// CHECK: return %[[VAL_3]] : vector<2xf64> +// CHECK: } + +// CHECK-LABEL: func.func @_Z15test_negmul_rhsIDv2_dET_S1_S1_S1_( +// CHECK-SAME: %[[VAL_0:.*]]: vector<2xf64>, %[[VAL_1:.*]]: vector<2xf64>, %[[VAL_2:.*]]: vector<2xf64>) -> vector<2xf64> +// CHECK: %[[VAL_3:.*]] = arith.negf %[[VAL_1]] : vector<2xf64> +// CHECK: %[[VAL_4:.*]] = math.fma %[[VAL_3]], %[[VAL_2]], %[[VAL_0]] : vector<2xf64> +// CHECK: return %[[VAL_4]] : vector<2xf64> +// CHECK: } + +// CHECK-LABEL: func.func @_Z15test_negadd_rhsIDv2_dET_S1_S1_S1_( +// CHECK-SAME: %[[VAL_0:.*]]: vector<2xf64>, %[[VAL_1:.*]]: vector<2xf64>, %[[VAL_2:.*]]: vector<2xf64>) -> vector<2xf64> +// CHECK: %[[VAL_3:.*]] = arith.negf %[[VAL_1]] : vector<2xf64> +// CHECK: %[[VAL_4:.*]] = math.fma %[[VAL_3]], %[[VAL_2]], %[[VAL_0]] : vector<2xf64> +// CHECK: return %[[VAL_4]] : vector<2xf64> +// CHECK: } + +// CHECK-LABEL: func.func @_Z22test_negmul_negadd_rhsIDv2_dET_S1_S1_S1_( +// CHECK-SAME: %[[VAL_0:.*]]: vector<2xf64>, %[[VAL_1:.*]]: vector<2xf64>, %[[VAL_2:.*]]: vector<2xf64>) -> vector<2xf64> +// CHECK: %[[VAL_3:.*]] = math.fma %[[VAL_1]], %[[VAL_2]], %[[VAL_0]] : vector<2xf64> +// CHECK: return %[[VAL_3]] : vector<2xf64> +// CHECK: } diff --git a/polygeist/tools/cgeist/Test/Verification/gettimeofday.c b/polygeist/tools/cgeist/Test/Verification/gettimeofday.c index c5e97a753ede8..84f0eb3a62853 100644 --- a/polygeist/tools/cgeist/Test/Verification/gettimeofday.c +++ b/polygeist/tools/cgeist/Test/Verification/gettimeofday.c @@ -20,7 +20,6 @@ double alloc() { // CHECK-NEXT: %[[VAL_8:.*]] = llvm.getelementptr inbounds %[[VAL_2]][0, 1] : (!llvm.ptr) -> !llvm.ptr, !llvm.struct<(i64, i64)> // CHECK-NEXT: %[[VAL_9:.*]] = llvm.load %[[VAL_8]] : !llvm.ptr -> i64 // CHECK-NEXT: %[[VAL_10:.*]] = arith.sitofp %[[VAL_9]] : i64 to f64 -// CHECK-NEXT: %[[VAL_11:.*]] = arith.mulf %[[VAL_10]], %[[VAL_0]] : f64 -// CHECK-NEXT: %[[VAL_12:.*]] = arith.addf %[[VAL_7]], %[[VAL_11]] : f64 -// CHECK-NEXT: return %[[VAL_12]] : f64 +// CHECK-NEXT: %[[VAL_11:.*]] = math.fma %[[VAL_10]], %[[VAL_0]], %[[VAL_7]] : f64 +// CHECK-NEXT: return %[[VAL_11]] : f64 // CHECK-NEXT: } diff --git a/polygeist/tools/cgeist/Test/Verification/raiseToAffine.c b/polygeist/tools/cgeist/Test/Verification/raiseToAffine.c index be866a6c167ae..5dc8f444bd9e0 100644 --- a/polygeist/tools/cgeist/Test/Verification/raiseToAffine.c +++ b/polygeist/tools/cgeist/Test/Verification/raiseToAffine.c @@ -19,9 +19,8 @@ void matmul(DATA_TYPE A[N][K], DATA_TYPE B[K][M], DATA_TYPE C[N][M]) { for (k = 0; k < K; k++) // GEMMSIGNED: {{.*}} = affine.load %{{.*}}[%{{.*}}, %{{.*}}] : memref // GEMMSIGNED: {{.*}} = affine.load %{{.*}}[%{{.*}}, %{{.*}}] : memref - // GEMMSIGNED: {{.*}} = arith.mulf // GEMMSIGNED: {{.*}} = affine.load %{{.*}}[%{{.*}}, %{{.*}}] : memref - // GEMMSIGNED: {{.*}} = arith.addf + // GEMMSIGNED: {{.*}} = math.fma // GEMMSIGNED: affine.store {{.*}}, %{{.*}}[%{{.*}}, %{{.*}}] : memref C[i][j] += A[i][k] * B[k][j]; } @@ -40,9 +39,8 @@ void matmul_unsigned_cmp(float A[100][200], float B[200][300], float C[100][300] for (k = 0; k < 200; k++) { // GEMMUNSIGNED: {{.*}} = affine.load %{{.*}}[%{{.*}}, %{{.*}}] : memref // GEMMUNSIGNED: {{.*}} = affine.load %{{.*}}[%{{.*}}, %{{.*}}] : memref - // GEMMUNSIGNED: {{.*}} = arith.mulf // GEMMUNSIGNED: {{.*}} = affine.load %{{.*}}[%{{.*}}, %{{.*}}] : memref - // GEMMUNSIGNED: {{.*}} = arith.addf + // GEMMUNSIGNED: {{.*}} = math.fma // GEMMUNSIGNED: affine.store {{.*}}, %{{.*}}[%{{.*}}, %{{.*}}] : memref C[i][j] += A[i][k] * B[k][j]; } diff --git a/polygeist/tools/cgeist/Test/Verification/raiseToAffineUnsignedCmp.c b/polygeist/tools/cgeist/Test/Verification/raiseToAffineUnsignedCmp.c index ecd7889f871e5..91aaab0b8039e 100644 --- a/polygeist/tools/cgeist/Test/Verification/raiseToAffineUnsignedCmp.c +++ b/polygeist/tools/cgeist/Test/Verification/raiseToAffineUnsignedCmp.c @@ -13,9 +13,8 @@ void matmul(float A[100][200], float B[200][300], float C[100][300]) { for (k = 0; k < 200; k++) { // CHECK: {{.*}} = affine.load %{{.*}}[%{{.*}}, %{{.*}}] : memref // CHECK: {{.*}} = affine.load %{{.*}}[%{{.*}}, %{{.*}}] : memref - // CHECK: {{.*}} = arith.mulf // CHECK: {{.*}} = affine.load %{{.*}}[%{{.*}}, %{{.*}}] : memref - // CHECK: {{.*}} = arith.addf + // CHECK: {{.*}} = math.fma // CHECK: affine.store {{.*}}, %{{.*}}[%{{.*}}, %{{.*}}] : memref C[i][j] += A[i][k] * B[k][j]; } diff --git a/polygeist/tools/cgeist/Test/Verification/sgesv.c b/polygeist/tools/cgeist/Test/Verification/sgesv.c index 0f780194d3664..b77819cf80037 100644 --- a/polygeist/tools/cgeist/Test/Verification/sgesv.c +++ b/polygeist/tools/cgeist/Test/Verification/sgesv.c @@ -30,34 +30,32 @@ void kernel_correlation(int n, double alpha, double beta, } -// CHECK: func @{{.*}}kernel_correlation{{.*}}(%arg0: i32{{.*}}, %arg1: f64{{.*}}, %arg2: f64{{.*}}, %arg3: memref{{.*}}llvm.noalias{{.*}}, %arg4: memref{{.*}}llvm.noalias{{.*}}, %arg5: memref{{.*}}llvm.noalias{{.*}}, %arg6: memref{{.*}}llvm.noalias{{.*}}, %arg7: memref{{.*}}llvm.noalias{{.*}}) -// CHECK-NEXT: %cst = arith.constant 0.000000e+00 : f64 -// CHECK-NEXT: %0 = arith.index_cast %arg0 : i32 to index -// CHECK-NEXT: affine.for %arg8 = 0 to %0 { -// CHECK-NEXT: affine.store %cst, %arg5[%arg8] : memref -// CHECK-NEXT: affine.store %cst, %arg7[%arg8] : memref -// CHECK-NEXT: %1 = affine.load %arg5[%arg8] : memref -// CHECK-NEXT: %2 = affine.load %arg7[%arg8] : memref -// CHECK-NEXT: %3:2 = affine.for %arg9 = 0 to %0 iter_args(%arg10 = %1, %arg11 = %2) -> (f64, f64) { -// CHECK-NEXT: %9 = affine.load %arg3[%arg8, %arg9] : memref -// CHECK-NEXT: %10 = affine.load %arg6[%arg9] : memref -// CHECK-NEXT: %11 = arith.mulf %9, %10 : f64 -// CHECK-NEXT: %12 = arith.addf %11, %arg10 : f64 -// CHECK-NEXT: %13 = affine.load %arg4[%arg8, %arg9] : memref -// CHECK-NEXT: %14 = arith.mulf %13, %10 : f64 -// CHECK-NEXT: %15 = arith.addf %14, %arg11 : f64 -// CHECK-NEXT: affine.yield %12, %15 : f64, f64 -// CHECK-NEXT: } -// CHECK-NEXT: affine.store %3#1, %arg7[%arg8] : memref -// CHECK-NEXT: affine.store %3#0, %arg5[%arg8] : memref -// CHECK-NEXT: %4 = affine.load %arg5[%arg8] : memref -// CHECK-NEXT: %5 = arith.mulf %arg1, %4 : f64 -// CHECK-NEXT: %6 = affine.load %arg7[%arg8] : memref -// CHECK-NEXT: %7 = arith.mulf %arg2, %6 : f64 -// CHECK-NEXT: %8 = arith.addf %5, %7 : f64 -// CHECK-NEXT: affine.store %8, %arg7[%arg8] : memref -// CHECK-NEXT: } -// CHECK-NEXT: return -// CHECK-NEXT: } +// CHECK-LABEL: func.func @kernel_correlation( +// CHECK-SAME: %[[VAL_0:.*]]: i32 {llvm.noundef}, %[[VAL_1:.*]]: f64 {llvm.noundef}, %[[VAL_2:.*]]: f64 {llvm.noundef}, %[[VAL_3:.*]]: memref {llvm.noalias, llvm.noundef}, %[[VAL_4:.*]]: memref {llvm.noalias, llvm.noundef}, %[[VAL_5:.*]]: memref {llvm.noalias, llvm.noundef}, %[[VAL_6:.*]]: memref {llvm.noalias, llvm.noundef}, %[[VAL_7:.*]]: memref {llvm.noalias, llvm.noundef}) +// CHECK: %[[VAL_8:.*]] = arith.constant 0.000000e+00 : f64 +// CHECK: %[[VAL_9:.*]] = arith.index_cast %[[VAL_0]] : i32 to index +// CHECK: affine.for %[[VAL_10:.*]] = 0 to %[[VAL_9]] { +// CHECK: affine.store %[[VAL_8]], %[[VAL_5]]{{\[}}%[[VAL_10]]] : memref +// CHECK: affine.store %[[VAL_8]], %[[VAL_7]]{{\[}}%[[VAL_10]]] : memref +// CHECK: %[[VAL_11:.*]] = affine.load %[[VAL_5]]{{\[}}%[[VAL_10]]] : memref +// CHECK: %[[VAL_12:.*]] = affine.load %[[VAL_7]]{{\[}}%[[VAL_10]]] : memref +// CHECK: %[[VAL_13:.*]]:2 = affine.for %[[VAL_14:.*]] = 0 to %[[VAL_9]] iter_args(%[[VAL_15:.*]] = %[[VAL_11]], %[[VAL_16:.*]] = %[[VAL_12]]) -> (f64, f64) { +// CHECK: %[[VAL_17:.*]] = affine.load %[[VAL_3]]{{\[}}%[[VAL_10]], %[[VAL_14]]] : memref +// CHECK: %[[VAL_18:.*]] = affine.load %[[VAL_6]]{{\[}}%[[VAL_14]]] : memref +// CHECK: %[[VAL_19:.*]] = math.fma %[[VAL_17]], %[[VAL_18]], %[[VAL_15]] : f64 +// CHECK: %[[VAL_20:.*]] = affine.load %[[VAL_4]]{{\[}}%[[VAL_10]], %[[VAL_14]]] : memref +// CHECK: %[[VAL_21:.*]] = math.fma %[[VAL_20]], %[[VAL_18]], %[[VAL_16]] : f64 +// CHECK: affine.yield %[[VAL_19]], %[[VAL_21]] : f64, f64 +// CHECK: } +// CHECK: affine.store %[[VAL_22:.*]]#1, %[[VAL_7]]{{\[}}%[[VAL_10]]] : memref +// CHECK: affine.store %[[VAL_22]]#0, %[[VAL_5]]{{\[}}%[[VAL_10]]] : memref +// CHECK: %[[VAL_23:.*]] = affine.load %[[VAL_5]]{{\[}}%[[VAL_10]]] : memref +// CHECK: %[[VAL_24:.*]] = affine.load %[[VAL_7]]{{\[}}%[[VAL_10]]] : memref +// CHECK: %[[VAL_25:.*]] = arith.mulf %[[VAL_2]], %[[VAL_24]] : f64 +// CHECK: %[[VAL_26:.*]] = math.fma %[[VAL_1]], %[[VAL_23]], %[[VAL_25]] : f64 +// CHECK: affine.store %[[VAL_26]], %[[VAL_7]]{{\[}}%[[VAL_10]]] : memref +// CHECK: } +// CHECK: return +// CHECK: } // FULLRANK: func @kernel_correlation(%{{.*}}: i32, %{{.*}}: f64, %{{.*}}: f64, %{{.*}}: memref<28x28xf64>, %{{.*}}: memref<28x28xf64>, %{{.*}}: memref<28xf64>, %{{.*}}: memref<28xf64>, %{{.*}}: memref<28xf64>) diff --git a/polygeist/tools/cgeist/Test/polybench/datamining/correlation/correlation.c b/polygeist/tools/cgeist/Test/polybench/datamining/correlation/correlation.c index 4e262a77b6023..5ec0f309e105a 100644 --- a/polygeist/tools/cgeist/Test/polybench/datamining/correlation/correlation.c +++ b/polygeist/tools/cgeist/Test/polybench/datamining/correlation/correlation.c @@ -1,19 +1,19 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 -lm && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 -lm && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 -lm && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %stdinclude -O3 -S | FileCheck %s +// RUN: cgeist -omit-fp-contract %s %stdinclude -O3 -S | FileCheck %s /** * This version is stamped on May 10, 2016 diff --git a/polygeist/tools/cgeist/Test/polybench/datamining/covariance/covariance.c b/polygeist/tools/cgeist/Test/polybench/datamining/covariance/covariance.c index eecebc479ec03..091363733c999 100644 --- a/polygeist/tools/cgeist/Test/polybench/datamining/covariance/covariance.c +++ b/polygeist/tools/cgeist/Test/polybench/datamining/covariance/covariance.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/gemm/gemm.c b/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/gemm/gemm.c index 3a5aeb3681bba..4af1e36702ba2 100644 --- a/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/gemm/gemm.c +++ b/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/gemm/gemm.c @@ -1,16 +1,16 @@ -// RUN: cgeist %s %stdinclude -S | FileCheck %s -// RUN: cgeist %s %stdinclude -S --memref-fullrank | FileCheck %s --check-prefix=FULLRANK +// RUN: cgeist -omit-fp-contract %s %stdinclude -S | FileCheck %s +// RUN: cgeist -omit-fp-contract %s %stdinclude -S --memref-fullrank | FileCheck %s --check-prefix=FULLRANK // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/gemver/gemver.c b/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/gemver/gemver.c index 593a69139b86a..c302412cb66b8 100644 --- a/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/gemver/gemver.c +++ b/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/gemver/gemver.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/gesummv/gesummv.c b/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/gesummv/gesummv.c index a72f8879c7133..b752217581cdb 100644 --- a/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/gesummv/gesummv.c +++ b/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/gesummv/gesummv.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/symm/symm.c b/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/symm/symm.c index af5c3fe36331a..bc32612565fc7 100644 --- a/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/symm/symm.c +++ b/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/symm/symm.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/syr2k/syr2k.c b/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/syr2k/syr2k.c index 2f788ff6b4fba..c28636f1ef1d6 100644 --- a/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/syr2k/syr2k.c +++ b/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/syr2k/syr2k.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/syrk/syrk.c b/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/syrk/syrk.c index d7cde6a5143e8..e9cceab9a15cf 100644 --- a/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/syrk/syrk.c +++ b/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/syrk/syrk.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/trmm/trmm.c b/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/trmm/trmm.c index e82c6badfbf82..ff80fd3d33645 100644 --- a/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/trmm/trmm.c +++ b/polygeist/tools/cgeist/Test/polybench/linear-algebra/blas/trmm/trmm.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/2mm/2mm.c b/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/2mm/2mm.c index c474424052f3f..83e9c8451e644 100644 --- a/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/2mm/2mm.c +++ b/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/2mm/2mm.c @@ -1,18 +1,18 @@ -// RUN: cgeist %s -O2 %stdinclude -S | FileCheck %s +// RUN: cgeist -omit-fp-contract %s -O2 %stdinclude -S | FileCheck %s // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s -O3 %polyverify %stdinclude -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s -O3 %polyverify %stdinclude -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s -O3 %polyexec %stdinclude -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s -O3 %polyexec %stdinclude -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // COM: Missing allockind and allocsize attributes -// RUN: cgeist -O2 -raise-scf-to-affine %s %stdinclude -S -D POLYBENCH_USE_RESTRICT -enable-attributes -// RUN: cgeist -O2 -raise-scf-to-affine %s %stdinclude -S | FileCheck %s --check-prefixes=CHECK,NRESTRICT +// RUN: cgeist -omit-fp-contract -O2 -raise-scf-to-affine %s %stdinclude -S -D POLYBENCH_USE_RESTRICT -enable-attributes +// RUN: cgeist -omit-fp-contract -O2 -raise-scf-to-affine %s %stdinclude -S | FileCheck %s --check-prefixes=CHECK,NRESTRICT // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s -O3 %polyverify %stdinclude -detect-reduction -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s -O3 %polyverify %stdinclude -detect-reduction -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/3mm/3mm.c b/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/3mm/3mm.c index 260403c34fa24..e414f0dd2cda3 100644 --- a/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/3mm/3mm.c +++ b/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/3mm/3mm.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/atax/atax.c b/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/atax/atax.c index 1fb2e83bca08d..a8eb09af8c7b3 100644 --- a/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/atax/atax.c +++ b/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/atax/atax.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/bicg/bicg.c b/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/bicg/bicg.c index 1cb2508215ac8..0aad42fb47c67 100644 --- a/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/bicg/bicg.c +++ b/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/bicg/bicg.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/doitgen/doitgen.c b/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/doitgen/doitgen.c index 70a1dd838f514..886dab389c2e2 100644 --- a/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/doitgen/doitgen.c +++ b/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/doitgen/doitgen.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/mvt/mvt.c b/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/mvt/mvt.c index c6b3966b922bc..548faf2411798 100644 --- a/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/mvt/mvt.c +++ b/polygeist/tools/cgeist/Test/polybench/linear-algebra/kernels/mvt/mvt.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/cholesky/cholesky.c b/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/cholesky/cholesky.c index fe17cffc141b2..8aa90b08ab6d2 100644 --- a/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/cholesky/cholesky.c +++ b/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/cholesky/cholesky.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 -lm && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 -lm && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 -lm && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/durbin/durbin.c b/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/durbin/durbin.c index e0a1fb35aed4f..4c960fe982473 100644 --- a/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/durbin/durbin.c +++ b/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/durbin/durbin.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/gramschmidt/gramschmidt.c b/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/gramschmidt/gramschmidt.c index 93e07d348f99f..a610cd818887f 100644 --- a/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/gramschmidt/gramschmidt.c +++ b/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/gramschmidt/gramschmidt.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 -lm && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 -lm && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 -lm && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/lu/lu.c b/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/lu/lu.c index be23d18b0297e..b5e971b734007 100644 --- a/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/lu/lu.c +++ b/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/lu/lu.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/ludcmp/ludcmp.c b/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/ludcmp/ludcmp.c index ba353e4e18008..ff4ee46206d0d 100644 --- a/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/ludcmp/ludcmp.c +++ b/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/ludcmp/ludcmp.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/trisolv/trisolv.c b/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/trisolv/trisolv.c index d48879a9c377d..85cd60f6d6342 100644 --- a/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/trisolv/trisolv.c +++ b/polygeist/tools/cgeist/Test/polybench/linear-algebra/solvers/trisolv/trisolv.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/medley/deriche/deriche.c b/polygeist/tools/cgeist/Test/polybench/medley/deriche/deriche.c index 9497c40dc5257..73e7ef1f553ab 100644 --- a/polygeist/tools/cgeist/Test/polybench/medley/deriche/deriche.c +++ b/polygeist/tools/cgeist/Test/polybench/medley/deriche/deriche.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm -lm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm -lm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm -lm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm -lm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm -lm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm -lm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/medley/floyd-warshall/floyd-warshall.c b/polygeist/tools/cgeist/Test/polybench/medley/floyd-warshall/floyd-warshall.c index d5a9cf3924c88..489d876a57795 100644 --- a/polygeist/tools/cgeist/Test/polybench/medley/floyd-warshall/floyd-warshall.c +++ b/polygeist/tools/cgeist/Test/polybench/medley/floyd-warshall/floyd-warshall.c @@ -1,15 +1,15 @@ -// RUN: cgeist %s -O2 %stdinclude -S | FileCheck %s +// RUN: cgeist -omit-fp-contract %s -O2 %stdinclude -S | FileCheck %s // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/medley/nussinov/Nussinov.orig.c b/polygeist/tools/cgeist/Test/polybench/medley/nussinov/Nussinov.orig.c index 0164bffcc722f..b5ee07c7f3fb3 100644 --- a/polygeist/tools/cgeist/Test/polybench/medley/nussinov/Nussinov.orig.c +++ b/polygeist/tools/cgeist/Test/polybench/medley/nussinov/Nussinov.orig.c @@ -1,5 +1,5 @@ -// RUN: cgeist %s %stdinclude -S | FileCheck %s -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %stdinclude -S | FileCheck %s +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm | FileCheck %s --check-prefix EXEC // requires loop restructure use after while fix // XFAIL: * /** diff --git a/polygeist/tools/cgeist/Test/polybench/medley/nussinov/nussinov.c b/polygeist/tools/cgeist/Test/polybench/medley/nussinov/nussinov.c index 126fa89691031..ff01914903ecc 100644 --- a/polygeist/tools/cgeist/Test/polybench/medley/nussinov/nussinov.c +++ b/polygeist/tools/cgeist/Test/polybench/medley/nussinov/nussinov.c @@ -1,21 +1,21 @@ // Copyright (C) Codeplay Software Limited // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %stdinclude -O3 -S | FileCheck %s +// RUN: cgeist -omit-fp-contract %s %stdinclude -O3 -S | FileCheck %s /** * This version is stamped on May 10, 2016 diff --git a/polygeist/tools/cgeist/Test/polybench/stencils/adi/adi.c b/polygeist/tools/cgeist/Test/polybench/stencils/adi/adi.c index 51f6a492a63c1..d62604851bdea 100644 --- a/polygeist/tools/cgeist/Test/polybench/stencils/adi/adi.c +++ b/polygeist/tools/cgeist/Test/polybench/stencils/adi/adi.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/stencils/fdtd-2d/fdtd-2d.c b/polygeist/tools/cgeist/Test/polybench/stencils/fdtd-2d/fdtd-2d.c index ba0358d865367..e1554d1a86534 100644 --- a/polygeist/tools/cgeist/Test/polybench/stencils/fdtd-2d/fdtd-2d.c +++ b/polygeist/tools/cgeist/Test/polybench/stencils/fdtd-2d/fdtd-2d.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/stencils/heat-3d/heat-3d.c b/polygeist/tools/cgeist/Test/polybench/stencils/heat-3d/heat-3d.c index e765e45dc889b..6e7485688d4e1 100644 --- a/polygeist/tools/cgeist/Test/polybench/stencils/heat-3d/heat-3d.c +++ b/polygeist/tools/cgeist/Test/polybench/stencils/heat-3d/heat-3d.c @@ -1,14 +1,14 @@ // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/stencils/jacobi-1d/jacobi-1d.c b/polygeist/tools/cgeist/Test/polybench/stencils/jacobi-1d/jacobi-1d.c index 142acd13c535e..fdf3188bbac0f 100644 --- a/polygeist/tools/cgeist/Test/polybench/stencils/jacobi-1d/jacobi-1d.c +++ b/polygeist/tools/cgeist/Test/polybench/stencils/jacobi-1d/jacobi-1d.c @@ -1,15 +1,15 @@ -// RUN: cgeist %s -O2 %stdinclude -S | FileCheck %s +// RUN: cgeist -omit-fp-contract %s -O2 %stdinclude -S | FileCheck %s // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s -O3 %polyverify %stdinclude -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s -O3 %polyverify %stdinclude -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s -O3 %polyexec %stdinclude -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s -O3 %polyexec %stdinclude -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s -O3 %polyverify %stdinclude -detect-reduction -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s -O3 %polyverify %stdinclude -detect-reduction -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/stencils/jacobi-2d/jacobi-2d.c b/polygeist/tools/cgeist/Test/polybench/stencils/jacobi-2d/jacobi-2d.c index ad6dcc262a67e..fc311d6614a09 100644 --- a/polygeist/tools/cgeist/Test/polybench/stencils/jacobi-2d/jacobi-2d.c +++ b/polygeist/tools/cgeist/Test/polybench/stencils/jacobi-2d/jacobi-2d.c @@ -1,15 +1,15 @@ -// RUN: cgeist %s -O2 %stdinclude -S | FileCheck %s +// RUN: cgeist -omit-fp-contract %s -O2 %stdinclude -S | FileCheck %s // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/stencils/seidel-2d/seidel-2d.c b/polygeist/tools/cgeist/Test/polybench/stencils/seidel-2d/seidel-2d.c index 791766591b807..8d31b09ebe156 100644 --- a/polygeist/tools/cgeist/Test/polybench/stencils/seidel-2d/seidel-2d.c +++ b/polygeist/tools/cgeist/Test/polybench/stencils/seidel-2d/seidel-2d.c @@ -1,15 +1,15 @@ -// RUN: cgeist %s -O2 %stdinclude -S | FileCheck %s +// RUN: cgeist -omit-fp-contract %s -O2 %stdinclude -S | FileCheck %s // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 -// RUN: cgeist %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC +// RUN: cgeist -omit-fp-contract %s %polyexec %stdinclude -O3 -o %s.execm && %s.execm > %s.mlir.time; cat %s.mlir.time | FileCheck %s --check-prefix EXEC // RUN: clang %s -O3 %polyexec %stdinclude -o %s.exec2 && %s.exec2 > %s.clang.time; cat %s.clang.time | FileCheck %s --check-prefix EXEC // RUN: rm -f %s.exec2 %s.execm %s.mlir.time %s.clang.time // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 -// RUN: cgeist %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 +// RUN: cgeist -omit-fp-contract %s %polyverify %stdinclude -detect-reduction -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 diff --git a/polygeist/tools/cgeist/Test/polybench/utilities/polybench.c b/polygeist/tools/cgeist/Test/polybench/utilities/polybench.c index 6426ec9a6f02f..92f72a470a8c6 100644 --- a/polygeist/tools/cgeist/Test/polybench/utilities/polybench.c +++ b/polygeist/tools/cgeist/Test/polybench/utilities/polybench.c @@ -1,4 +1,4 @@ -// RUN: cgeist %s polybench_alloc_data %stdinclude -S | FileCheck %s +// RUN: cgeist -omit-fp-contract %s polybench_alloc_data %stdinclude -S | FileCheck %s // XFAIL: * /** * This version is stamped on May 10, 2016