[clang] c1ab198 - [Clang][OpenMP]Solved the the always truth condition in Arm64
Shivam Gupta via cfe-commits
cfe-commits at lists.llvm.org
Sat May 6 09:30:08 PDT 2023
Author: Samuel Maina
Date: 2023-05-06T22:00:00+05:30
New Revision: c1ab19850d5c42a6f76d9bd6049f9cba6e08fba1
URL: https://github.com/llvm/llvm-project/commit/c1ab19850d5c42a6f76d9bd6049f9cba6e08fba1
DIFF: https://github.com/llvm/llvm-project/commit/c1ab19850d5c42a6f76d9bd6049f9cba6e08fba1.diff
LOG: [Clang][OpenMP]Solved the the always truth condition in Arm64
There was a bug in the getAArch64MTV function on the third if statement which returns truth as reported by this issue [[ https://github.com/llvm/llvm-project/issues/61319 |[Clang] Condition is always true which is caused by a possible copy-pasted bug in CGOpenMPRuntime.cpp
]].
All the testcases are passing. The first unit tests I could find are for functions that are 6 levels from this issue. The function is very low level and couldn't find a way to affect it from the higher functions.
Reviewed By: jhuber6
Differential Revision: https://reviews.llvm.org/D146370
Added:
Modified:
clang/lib/CodeGen/CGOpenMPRuntime.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index ce92aa21e0fc5..a74f63cd1fac9 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -11160,7 +11160,7 @@ static bool getAArch64MTV(QualType QT, ParamKindTy Kind) {
if (Kind == ParamKindTy::Uniform)
return false;
- if (Kind == ParamKindTy::LinearUVal || ParamKindTy::LinearRef)
+ if (Kind == ParamKindTy::LinearUVal || Kind == ParamKindTy::LinearRef)
return false;
if ((Kind == ParamKindTy::Linear || Kind == ParamKindTy::LinearVal) &&
More information about the cfe-commits
mailing list