mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-08 09:03:18 +00:00
GlobalISel: Make special case handling clearer
The special case here is really G_UNMERGE_VALUES, not G_EXTRACT. The other opcodes can hardcode index 1 like G_EXTRACT.
This commit is contained in:
parent
d98a7c3cf4
commit
91bec1d385
@ -812,10 +812,10 @@ private:
|
||||
case TargetOpcode::G_ZEXT:
|
||||
case TargetOpcode::G_ANYEXT:
|
||||
case TargetOpcode::G_SEXT:
|
||||
case TargetOpcode::G_UNMERGE_VALUES:
|
||||
return MI.getOperand(MI.getNumOperands() - 1).getReg();
|
||||
case TargetOpcode::G_EXTRACT:
|
||||
return MI.getOperand(1).getReg();
|
||||
case TargetOpcode::G_UNMERGE_VALUES:
|
||||
return MI.getOperand(MI.getNumOperands() - 1).getReg();
|
||||
default:
|
||||
llvm_unreachable("Not a legalization artifact happen");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user