summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorYaxun (Sam) Liu <yaxun.liu@amd.com>2022-12-08 16:56:25 -0500
committerYaxun (Sam) Liu <yaxun.liu@amd.com>2022-12-08 17:35:10 -0500
commit262c3034bb44cac8b4ed6d4a3bb99ceb60d9e322 (patch)
tree93d4f7fef9bb2e39c62c5ce6db358b2dba299746 /clang/lib/CodeGen/CGExpr.cpp
parent5cfd815c14f378c50018f6967c027b758c3996a6 (diff)
Revert "[AMDGPU] Disable bool range metadata to workaround backend issue"
This reverts commit 107ee2613063183cb643cef97f0fad403508c9f0 to facilitate investigating and fixing the root cause. Differential Revision: https://reviews.llvm.org/D135269
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index b2ba3f53fa0b..afdee52aec62 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -1750,10 +1750,7 @@ llvm::Value *CodeGenFunction::EmitLoadOfScalar(Address Addr, bool Volatile,
if (EmitScalarRangeCheck(Load, Ty, Loc)) {
// In order to prevent the optimizer from throwing away the check, don't
// attach range metadata to the load.
- // TODO: Enable range metadata for AMDGCN after issue
- // https://github.com/llvm/llvm-project/issues/58176 is fixed.
- } else if (CGM.getCodeGenOpts().OptimizationLevel > 0 &&
- !CGM.getTriple().isAMDGCN())
+ } else if (CGM.getCodeGenOpts().OptimizationLevel > 0)
if (llvm::MDNode *RangeInfo = getRangeForLoadFromType(Ty))
Load->setMetadata(llvm::LLVMContext::MD_range, RangeInfo);