Skip to content

Commit d2b2257

Browse files
author
Robert Marsh
committed
C++: fix chi instr oeprands to chi instrs
1 parent 5007fd2 commit d2b2257

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,13 +573,13 @@ module DefUse {
573573
// An odd offset corresponds to the `Chi` instruction.
574574
defOffset = oldOffset * 2 + 1 and
575575
result = Chi(oldInstr) and
576-
defLocation = Alias::getResultMemoryLocation(oldInstr) and
576+
hasNonPhiDefinition(_, defLocation, defBlock, defOffset) and
577577
actualDefLocation = defLocation.getVirtualVariable()
578578
or
579579
// An even offset corresponds to the original instruction.
580580
defOffset = oldOffset * 2 and
581581
result = getNewInstruction(oldInstr) and
582-
defLocation = Alias::getResultMemoryLocation(oldInstr) and
582+
hasNonPhiDefinition(_, defLocation, defBlock, defOffset) and
583583
actualDefLocation = defLocation
584584
)
585585
or

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,13 +573,13 @@ module DefUse {
573573
// An odd offset corresponds to the `Chi` instruction.
574574
defOffset = oldOffset * 2 + 1 and
575575
result = Chi(oldInstr) and
576-
defLocation = Alias::getResultMemoryLocation(oldInstr) and
576+
hasNonPhiDefinition(_, defLocation, defBlock, defOffset) and
577577
actualDefLocation = defLocation.getVirtualVariable()
578578
or
579579
// An even offset corresponds to the original instruction.
580580
defOffset = oldOffset * 2 and
581581
result = getNewInstruction(oldInstr) and
582-
defLocation = Alias::getResultMemoryLocation(oldInstr) and
582+
hasNonPhiDefinition(_, defLocation, defBlock, defOffset) and
583583
actualDefLocation = defLocation
584584
)
585585
or

csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,13 +573,13 @@ module DefUse {
573573
// An odd offset corresponds to the `Chi` instruction.
574574
defOffset = oldOffset * 2 + 1 and
575575
result = Chi(oldInstr) and
576-
defLocation = Alias::getResultMemoryLocation(oldInstr) and
576+
hasNonPhiDefinition(_, defLocation, defBlock, defOffset) and
577577
actualDefLocation = defLocation.getVirtualVariable()
578578
or
579579
// An even offset corresponds to the original instruction.
580580
defOffset = oldOffset * 2 and
581581
result = getNewInstruction(oldInstr) and
582-
defLocation = Alias::getResultMemoryLocation(oldInstr) and
582+
hasNonPhiDefinition(_, defLocation, defBlock, defOffset) and
583583
actualDefLocation = defLocation
584584
)
585585
or

0 commit comments

Comments
 (0)