Skip to content

Commit

Permalink
Fix build error due to unsigned compare >= 0 in r263008 (NFC)
Browse files Browse the repository at this point in the history
Fixes error from building with clang:

/usr/local/google/home/tejohnson/llvm/llvm_15/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp:407:12:
error: comparison of unsigned expression >= 0 is always true
[-Werror,-Wtautological-compare]
  if ((Imm >= 0x000) && (Imm <= 0x0ff)) {
         ~~~ ^  ~~~~~

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263014 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
teresajohnson committed Mar 9, 2016
1 parent 6ed4786 commit 9925f81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ void AMDGPUInstPrinter::printOperandAndMods(const MCInst *MI, unsigned OpNo,
void AMDGPUInstPrinter::printDPPCtrlOperand(const MCInst *MI, unsigned OpNo,
raw_ostream &O) {
unsigned Imm = MI->getOperand(OpNo).getImm();
if ((Imm >= 0x000) && (Imm <= 0x0ff)) {
if (Imm <= 0x0ff) {
O << " quad_perm:";
printU8ImmDecOperand(MI, OpNo, O);
} else if ((Imm >= 0x101) && (Imm <= 0x10f)) {
Expand Down

0 comments on commit 9925f81

Please sign in to comment.