@@ -630,10 +630,18 @@ private module Cached {
630
630
Operand operand , int indirectionIndex , Operand operandRepr , int indirectionIndexRepr
631
631
) {
632
632
indirectionIndex = [ 1 .. countIndirectionsForCppType ( getLanguageType ( operand ) ) ] and
633
- exists ( Instruction load |
634
- isDereference ( load , operand , false ) and
635
- operandRepr = unique( | | getAUse ( load ) ) and
636
- indirectionIndexRepr = indirectionIndex - 1
633
+ (
634
+ exists ( Instruction load |
635
+ isDereference ( load , operand , false ) and
636
+ operandRepr = unique( | | getAUse ( load ) ) and
637
+ indirectionIndexRepr = indirectionIndex - 1
638
+ )
639
+ or
640
+ exists ( CopyValueInstruction copy |
641
+ copy .getSourceValueOperand ( ) = operand and
642
+ operandRepr = unique( | | getAUse ( copy ) ) and
643
+ indirectionIndexRepr = indirectionIndex
644
+ )
637
645
)
638
646
}
639
647
@@ -649,11 +657,19 @@ private module Cached {
649
657
Instruction instr , int indirectionIndex , Instruction instrRepr , int indirectionIndexRepr
650
658
) {
651
659
indirectionIndex = [ 1 .. countIndirectionsForCppType ( getResultLanguageType ( instr ) ) ] and
652
- exists ( Instruction load , Operand address |
653
- address = unique( | | getAUse ( instr ) ) and
654
- isDereference ( load , address , false ) and
655
- instrRepr = load and
656
- indirectionIndexRepr = indirectionIndex - 1
660
+ (
661
+ exists ( Instruction load , Operand address |
662
+ address = unique( | | getAUse ( instr ) ) and
663
+ isDereference ( load , address , false ) and
664
+ instrRepr = load and
665
+ indirectionIndexRepr = indirectionIndex - 1
666
+ )
667
+ or
668
+ exists ( CopyValueInstruction copy |
669
+ copy .getSourceValueOperand ( ) = unique( | | getAUse ( instr ) ) and
670
+ instrRepr = copy and
671
+ indirectionIndexRepr = indirectionIndex
672
+ )
657
673
)
658
674
}
659
675
0 commit comments