If an irreligious Jew is killed just because he or she is Jewish is that considered dying al kiddush Hashem - for sanctification of G-d's name?
Their death at the hands of vicious murderers certainly served as an atonement, and they died free of sin. This is inferred from the verse, "They have given the corpses of Your servants as food to the birds of the heaven, the flesh of Your pious ones to the beasts of the earth" (Psalms 79:2).
Our Sages taught that "your pious ones" refers to the righteous, while "your servants" refers to Jews who were not righteous during their lifetime, but having been murdered by non-Jews, their sins were atoned for thus earning the title "servants" of G-d (Sanhedrin 47). This is the source for the law that even though normally a heretic is not mourned for, if he or she is murdered they are mourned for (Rama, Shach Y.D. 340:5).