Skip to content

Commit 4b46b8c

Browse files
committed
[VE] Change to ignore wrong condition code
Change to ignore wrong condition code in VEValToCondCode. Because this assertion may cause crash depend on input from corrupted binary files. TODO: change to not parse wrong condition code.
1 parent fa0b8b5 commit 4b46b8c

File tree

1 file changed

+2
-1
lines changed
  • llvm/lib/Target/VE

1 file changed

+2
-1
lines changed

llvm/lib/Target/VE/VE.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ inline static VECC::CondCode VEValToCondCode(unsigned Val, bool IsInteger) {
268268
return VECC::CC_AT;
269269
}
270270
}
271-
llvm_unreachable("Invalid cond code");
271+
// Invalid condition may come through disassembler from corrupted input.
272+
// Therefore, return AF instead of `llvm_unreachable`
272273
return VECC::CC_AF;
273274
}
274275

0 commit comments

Comments
 (0)