Skip to content

Commit 5072201

Browse files
jbjRobert Marsh
authored andcommitted
C++: Fix join order
1 parent 838720b commit 5072201

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstruction.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,17 +569,18 @@ module DefUse {
569569
) {
570570
exists(OldInstruction oldInstr, int oldOffset |
571571
oldInstr = defBlock.getInstruction(oldOffset) and
572-
hasNonPhiDefinition(_, defLocation, defBlock, defOffset) and
573572
oldOffset >= 0
574573
|
575574
// An odd offset corresponds to the `Chi` instruction.
576575
defOffset = oldOffset * 2 + 1 and
577576
result = Chi(oldInstr) and
577+
hasNonPhiDefinition(_, defLocation, defBlock, defOffset) and
578578
actualDefLocation = defLocation.getVirtualVariable()
579579
or
580580
// An even offset corresponds to the original instruction.
581581
defOffset = oldOffset * 2 and
582582
result = getNewInstruction(oldInstr) and
583+
hasNonPhiDefinition(_, defLocation, defBlock, defOffset) and
583584
actualDefLocation = defLocation
584585
)
585586
or

0 commit comments

Comments
 (0)