mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
C++: Fix join order
This commit is contained in:
committed by
Robert Marsh
parent
838720bef0
commit
5072201b7e
@@ -569,17 +569,18 @@ module DefUse {
|
||||
) {
|
||||
exists(OldInstruction oldInstr, int oldOffset |
|
||||
oldInstr = defBlock.getInstruction(oldOffset) and
|
||||
hasNonPhiDefinition(_, defLocation, defBlock, defOffset) and
|
||||
oldOffset >= 0
|
||||
|
|
||||
// An odd offset corresponds to the `Chi` instruction.
|
||||
defOffset = oldOffset * 2 + 1 and
|
||||
result = Chi(oldInstr) and
|
||||
hasNonPhiDefinition(_, defLocation, defBlock, defOffset) and
|
||||
actualDefLocation = defLocation.getVirtualVariable()
|
||||
or
|
||||
// An even offset corresponds to the original instruction.
|
||||
defOffset = oldOffset * 2 and
|
||||
result = getNewInstruction(oldInstr) and
|
||||
hasNonPhiDefinition(_, defLocation, defBlock, defOffset) and
|
||||
actualDefLocation = defLocation
|
||||
)
|
||||
or
|
||||
|
||||
Reference in New Issue
Block a user