TargetOpcode::KILL confusion


Could someone please explain the semantics of TargetOpcode::KILL? Specifically, in this example, which register is killed? Would it be legal for operands 0 and 1 to refer to different registers?

128B %R3 = KILL %R3, %R3_1, %R3_23

(In my out-of-tree target, %R3 is a <4xi32> register, %R3_1 is an i32 sub-register of %R3, and %R3_23 is a <2xi32> sub-register of %R3).



KILL is usually just a placeholder for an operation that has been removed.
We keep it around not to have to update some data structure.
Its “semantic” is similar to a nop but unlike nops they won’t generate any code.

Typically, KILL instructions are created out of identity copies or instructions with only dead defs.