From 262c3034bb44cac8b4ed6d4a3bb99ceb60d9e322 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Thu, 8 Dec 2022 16:56:25 -0500 Subject: 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 --- clang/lib/CodeGen/CGExpr.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'clang/lib/CodeGen/CGExpr.cpp') 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); -- cgit v1.2.3