I think the actual issue is with the code in aarch64_build_constant:
/* zcount contains the number of additional MOVK instructions
required if the constant is built up with an initial MOVZ instruction,
while ncount is the number of MOVK instructions required if starting
with a MOVN instruction. Choose the sequence that yields the fewest
number of instructions, preferring MOVZ instructions when they are both
the same. */
if (ncount < zcount)
{
emit_move_insn (gen_rtx_REG (Pmode, regnum),
GEN_INT ((~val) & 0xffff));
tval = 0xffff;
}
else
{
emit_move_insn (gen_rtx_REG (Pmode, regnum),
GEN_INT (val & 0xffff));
tval = 0;
}
The GEN_INT in the first if branch is incorrect as it truncates the
immediate at 16-bits, and so we will never generate the "MOVN" form.
What it should be instead is: GEN_INT (~((~val) & 0xffff)) or
equivalent.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1263576
Title:
coinor-osi fails to build from source on arm64 (but did succeed
before)
To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1263576/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs