MAY CONTAIN MAJOR SPOILER FOR THE FLASH Season 3 Episode 22 and 23.
For months, The Flash has been teasing and building up to Iris West’s death at the hands of Savitar. In episode 22, “Infantino Street,” time finally here. The moment we’ve all been waiting for finally arrived. After all the effort Team Flash put into changing the future and saving Iris, did it work? In the episode, we see Iris finally dies but does she?
Well here's Our theory
1. In the scene where Joe and Iris are talking, Iris forgets the name of the song. Because she is not the real Iris (Someone switched place with her, with that face changing pen thingy). And when tells the name of the song, she snaps her fingers and repeats the name "JUST LIKE HOW HR PRETENDS HE KNOWS WHATS GOING ON...HE SNAPS HIS FINGERS AND REPEATS THE LAST WORDS SPOKEN!!!!"
2. It was a clever plan to let "Savitar" know where Iris is so that Savitar would kidnap HR impersonating Iris and murder him on the Infantino Street. But Flash Aka Barry doesn't know this and will not know until Savitar is dead/trapped.
3. When Cisco vibes Barry in the past - HR was supposed to be on the roof but he switched places with Joe because you know so he could sacrifice himself.
4. In the original future, Iris says to Barry before Savitar kills her on the Infantino street - "I love you", But when HR is Iris she/He says just "Barry".
5. Earth 2 Wells is impersonating HR after he sacrificed himself because if Barry knows Iris is alive and HR died then Savitar will also know and come back to actually kill her. Earth 2 Wells will impersonate HR until Savitar is dead/trapped.
Source - Review It Nerd