ABataev added inline comments.
================ Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:6168 llvm::Value *EVal = CGF.EmitScalarExpr(E); + if (auto CI = dyn_cast<llvm::ConstantInt>(EVal)) + EVal = CGF.Builder.CreateIntCast( ---------------- 1. `auto *CI` 2. What if this is not a constant, but just a value with int type? Is this possible? ================ Comment at: clang/lib/Sema/SemaOpenMP.cpp:11796 X = ThenBO->getLHS(); - D = ThenBO->getRHS(); + D = ThenBO->getRHS()->IgnoreImpCasts(); ---------------- Same question as before. It is assignment BO, do you really need to remove casts here? ================ Comment at: clang/lib/Sema/SemaOpenMP.cpp:11810 if (checkIfTwoExprsAreSame(ContextRef, X, BO->getLHS())) { - E = BO->getRHS(); + E = BO->getRHS()->IgnoreImpCasts(); } else if (checkIfTwoExprsAreSame(ContextRef, X, BO->getRHS())) { ---------------- Maybe, IgnoreImplicitAsWritten? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120290/new/ https://reviews.llvm.org/D120290 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits