From 75548de3014584d24cb6b8b57cef911b4afa0b30 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Tue, 15 Mar 2011 08:41:24 +0000 Subject: [PATCH] Avoid a compiler warning about reg possibly being used uninitialized when building with assertions disabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127675 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PTX/PTXISelLowering.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Target/PTX/PTXISelLowering.cpp b/lib/Target/PTX/PTXISelLowering.cpp index 147b2a82cfc..1b4b7e6625d 100644 --- a/lib/Target/PTX/PTXISelLowering.cpp +++ b/lib/Target/PTX/PTXISelLowering.cpp @@ -212,11 +212,9 @@ SDValue PTXTargetLowering:: else if (Outs[0].VT == MVT::f32) { reg = PTX::F0; } - else if (Outs[0].VT == MVT::f64) { - reg = PTX::FD0; - } else { - assert(false && "Can return only basic types"); + assert(Outs[0].VT == MVT::f64 && "Can return only basic types"); + reg = PTX::FD0; } MachineFunction &MF = DAG.getMachineFunction();