[Assignment Tracking][SROA] Handle createFragmentExpression failure
authorOCHyams <orlando.hyams@sony.com>
Wed, 5 Apr 2023 10:00:26 +0000 (11:00 +0100)
committerOCHyams <orlando.hyams@sony.com>
Wed, 5 Apr 2023 10:20:32 +0000 (11:20 +0100)
commit76740fb40ebb44ae47bc0396c7a177a296adc9f7
treea237b08544aa276df515aa3afd57983f31a2d68e
parent185863f7de7c53358c535cd51783ea4e7de214b2
[Assignment Tracking][SROA] Handle createFragmentExpression failure

createFragmentExpression will fail if it determines that the expression cannot
be split over fragments. Handle this case in SROA. Similarly to D147312 this
should be a rare occurrence as the `dbg.assign` will usually reference the
`Value` being stored without modifying it with a `DIExpression`.

Reviewed By: jmorse

Differential Revision: https://reviews.llvm.org/D147431
llvm/lib/Transforms/Scalar/SROA.cpp
llvm/test/DebugInfo/Generic/assignment-tracking/sroa/fail-fragment.ll [new file with mode: 0644]