[SystemZFrameLowering] Don't overrwrite R1D (backchain) when probing.
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Tue, 8 Dec 2020 00:33:28 +0000 (01:33 +0100)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Thu, 10 Dec 2020 21:06:18 +0000 (15:06 -0600)
commitea475c77ff9eab1de7d44684c8fb453b39f70081
treee49281ab9f7e758b7f0a05d33851ca7aaf810501
parentc24f88b4db2ef359f47e976d8d79334ced221288
[SystemZFrameLowering] Don't overrwrite R1D (backchain) when probing.

The loop-based probing done for stack clash protection altered R1D which
corrupted the backchain value to be stored after the probing was done.

By using R0D instead for the loop exit value, R1D is not modified.

Review: Ulrich Weigand.

Differential Revision: https://reviews.llvm.org/D92803
llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp
llvm/test/CodeGen/SystemZ/stack-clash-dynamic-alloca.ll
llvm/test/CodeGen/SystemZ/stack-clash-protection.ll