[llvm-commits] [PATCH] [R600] Fix warnings
Tom Stellard
tom at stellard.net
Thu Dec 13 11:47:18 PST 2012
On Tue, Dec 11, 2012 at 08:05:01PM -0800, NAKAMURA Takumi wrote:
> They are found with clang -DNDEBUG. Feel free to apply them in yourself.
>
> http://llvm-reviews.chandlerc.com/D206
>
r170142, thanks!
> Files:
> llvm/lib/Target/R600/AMDILIntrinsicInfo.cpp
> llvm/lib/Target/R600/R600ISelLowering.cpp
> llvm/lib/Target/R600/R600InstrInfo.cpp
>
> Index: llvm/lib/Target/R600/AMDILIntrinsicInfo.cpp
> ===================================================================
> --- llvm/lib/Target/R600/AMDILIntrinsicInfo.cpp
> +++ llvm/lib/Target/R600/AMDILIntrinsicInfo.cpp
> @@ -75,5 +75,5 @@
> AMDGPUIntrinsicInfo::getDeclaration(Module *M, unsigned IntrID,
> Type **Tys,
> unsigned numTys) const {
> - assert(!"Not implemented");
> + llvm_unreachable("Not implemented");
> }
> Index: llvm/lib/Target/R600/R600ISelLowering.cpp
> ===================================================================
> --- llvm/lib/Target/R600/R600ISelLowering.cpp
> +++ llvm/lib/Target/R600/R600ISelLowering.cpp
> @@ -413,7 +413,7 @@
> Inst = 1;
> break;
> default:
> - assert(0 && "Wrong buffer id for stream outputs !");
> + llvm_unreachable("Wrong buffer id for stream outputs !");
> }
>
> return InsertScalarToRegisterExport(DAG, Op.getDebugLoc(), OutputsMap,
> Index: llvm/lib/Target/R600/R600InstrInfo.cpp
> ===================================================================
> --- llvm/lib/Target/R600/R600InstrInfo.cpp
> +++ llvm/lib/Target/R600/R600InstrInfo.cpp
> @@ -605,6 +605,7 @@
> case MO_FLAG_ABS:
> assert(!IsOP3 && "Cannot set absolute value modifier for OP3 "
> "instructions.");
> + (void)IsOP3;
> switch (SrcIdx) {
> case 0: FlagIndex = getOperandIdx(*MI, R600Operands::SRC0_ABS); break;
> case 1: FlagIndex = getOperandIdx(*MI, R600Operands::SRC1_ABS); break;
> Index: llvm/lib/Target/R600/AMDILIntrinsicInfo.cpp
> ===================================================================
> --- llvm/lib/Target/R600/AMDILIntrinsicInfo.cpp
> +++ llvm/lib/Target/R600/AMDILIntrinsicInfo.cpp
> @@ -75,5 +75,5 @@
> AMDGPUIntrinsicInfo::getDeclaration(Module *M, unsigned IntrID,
> Type **Tys,
> unsigned numTys) const {
> - assert(!"Not implemented");
> + llvm_unreachable("Not implemented");
> }
> Index: llvm/lib/Target/R600/R600ISelLowering.cpp
> ===================================================================
> --- llvm/lib/Target/R600/R600ISelLowering.cpp
> +++ llvm/lib/Target/R600/R600ISelLowering.cpp
> @@ -413,7 +413,7 @@
> Inst = 1;
> break;
> default:
> - assert(0 && "Wrong buffer id for stream outputs !");
> + llvm_unreachable("Wrong buffer id for stream outputs !");
> }
>
> return InsertScalarToRegisterExport(DAG, Op.getDebugLoc(), OutputsMap,
> Index: llvm/lib/Target/R600/R600InstrInfo.cpp
> ===================================================================
> --- llvm/lib/Target/R600/R600InstrInfo.cpp
> +++ llvm/lib/Target/R600/R600InstrInfo.cpp
> @@ -605,6 +605,7 @@
> case MO_FLAG_ABS:
> assert(!IsOP3 && "Cannot set absolute value modifier for OP3 "
> "instructions.");
> + (void)IsOP3;
> switch (SrcIdx) {
> case 0: FlagIndex = getOperandIdx(*MI, R600Operands::SRC0_ABS); break;
> case 1: FlagIndex = getOperandIdx(*MI, R600Operands::SRC1_ABS); break;
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list