From 60dd937d56e6d941e45fdc43b1c7abb7b365788d Mon Sep 17 00:00:00 2001 From: Christopher Bate Date: Fri, 13 Jan 2023 13:23:56 -0700 Subject: [PATCH] [mlir][gpu] Fix build failure / silence windows build warnings Fixes Windows build failure (C4715) caused by 6ca1a09f03e8e940f306bea73efa935e4ee38173. --- mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp | 2 ++ mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp b/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp index f3cf780..40fd952 100644 --- a/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp +++ b/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp @@ -206,6 +206,8 @@ struct LowerGpuOpsToNVVMOpsPass case gpu::AddressSpace::Private: return 0; } + llvm_unreachable("unknown address space enum value"); + return 0; }); gpu::populateMemorySpaceLoweringPatterns(typeConverter, patterns); ConversionTarget target(getContext()); diff --git a/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp b/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp index 25571bd..034188f 100644 --- a/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp +++ b/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp @@ -146,6 +146,8 @@ struct LowerGpuOpsToROCDLOpsPass case gpu::AddressSpace::Private: return 5; } + llvm_unreachable("unknown address space enum value"); + return 0; }); ConversionTarget target(getContext()); gpu::populateLowerMemorySpaceOpLegality(target); -- 2.7.4