C++: No need to check if the offset is non-negative. It always is because of 'defBlock.getInstruction(oldOffset)' has a result.

This commit is contained in:
Mathias Vorreiter Pedersen
2024-07-04 10:30:31 +01:00
parent cf8b2d55c5
commit c4d72e5b4f

View File

@@ -712,10 +712,7 @@ module DefUse {
OldBlock defBlock, int defOffset, Alias::MemoryLocation defLocation,
Alias::MemoryLocation actualDefLocation
) {
exists(OldInstruction oldInstr, int oldOffset |
oldInstr = defBlock.getInstruction(oldOffset) and
oldOffset >= 0
|
exists(OldInstruction oldInstr, int oldOffset | oldInstr = defBlock.getInstruction(oldOffset) |
// An odd offset corresponds to the `Chi` instruction.
defOffset = getChiOffset(oldOffset, defBlock) and
result = getChi(oldInstr) and