2 Commits

Author SHA1 Message Date
Ilya Leoshkevich
a933e1417b
[SystemZ] Do not run mbackchain-4.c test without SystemZ target (#71678)
mbackchain-4.c requires running the backend and causes CI failures when
this target is not configured.
2023-11-08 15:53:10 +01:00
Ilya Leoshkevich
d79fff0abb
[SystemZ] Add backchain target-feature (#71668)
GCC supports building individual functions with backchain using the
__attribute__((target("backchain"))) syntax, and Clang should too.

Clang translates this into the "target-features"="+backchain" attribute,
and the -mbackchain command-line option into the "backchain" attribute.
The backend currently checks only the latter; furthermore, the backchain
target feature is not defined.

Handle backchain like soft-float. Define a target feature, convert
function attribute into it in getSubtargetImpl(), and check for target
feature instead of function attribute everywhere. Add an end-to-end test
to the Clang testsuite.
2023-11-08 15:05:47 +01:00