Add standard expansions for fcopysign.

This is also just a sign bit manipulation.
This commit is contained in:
Jakob Stoklund Olesen
2017-09-25 15:17:32 -07:00
parent 6bec5f8507
commit 79968a2325
3 changed files with 20 additions and 2 deletions

View File

@@ -226,3 +226,11 @@ for ty, minus_zero in [
b << minus_zero,
a << bxor(x, b),
))
expand.legalize(
a << insts.fcopysign.bind(ty)(x, y),
Rtl(
b << minus_zero,
a1 << band_not(x, b),
a2 << band(y, b),
a << bor(a1, a2)
))