diff --git a/cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll b/cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll index 9198b254250..b84c8c93be5 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll @@ -573,13 +573,19 @@ module DefUse { // An odd offset corresponds to the `Chi` instruction. defOffset = oldOffset * 2 + 1 and result = Chi(oldInstr) and - hasNonPhiDefinition(_, defLocation, defBlock, defOffset) and + ( + defLocation = Alias::getResultMemoryLocation(oldInstr) or + defLocation = Alias::getResultMemoryLocation(oldInstr).getVirtualVariable() + ) 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 + ( + defLocation = Alias::getResultMemoryLocation(oldInstr) or + defLocation = Alias::getResultMemoryLocation(oldInstr).getVirtualVariable() + ) and actualDefLocation = defLocation ) or diff --git a/csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll b/csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll index 9198b254250..b84c8c93be5 100644 --- a/csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll +++ b/csharp/ql/src/semmle/code/csharp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll @@ -573,13 +573,19 @@ module DefUse { // An odd offset corresponds to the `Chi` instruction. defOffset = oldOffset * 2 + 1 and result = Chi(oldInstr) and - hasNonPhiDefinition(_, defLocation, defBlock, defOffset) and + ( + defLocation = Alias::getResultMemoryLocation(oldInstr) or + defLocation = Alias::getResultMemoryLocation(oldInstr).getVirtualVariable() + ) 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 + ( + defLocation = Alias::getResultMemoryLocation(oldInstr) or + defLocation = Alias::getResultMemoryLocation(oldInstr).getVirtualVariable() + ) and actualDefLocation = defLocation ) or