llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Unrecognized value "pwr4" and "pwr7" on a Power8 machine

Open noloader opened this issue 8 years ago • 2 comments

Bugzilla Link 38379
Version 4.0
OS Linux
CC @jedilyn

Extended Description

I'm working on GCC112 on the compile farm. GCC1128 is Power8/ISA 2.07, but Power4 and Power7 probes are failing:

gcc2-power8]$ xlC -qarch=pwr4 -qaltivec -c adhoc.cpp warning: 1540-5203 Unrecognized value "pwr4" specified with option "arch". 1 warning generated. gcc2-power8]$ xlC -qarch=pwr7 -qaltivec -c adhoc.cpp warning: 1540-5203 Unrecognized value "pwr7" specified with option "arch". 1 warning generated. gcc2-power8]$ xlC -qarch=pwr8 -qaltivec -c adhoc.cpp gcc2-power8]$

And from GCC119 which is the AIX machine on the compile farm:

-bash-4.4$ xlC -qarch=pwr4 -c adhoc.cpp -bash-4.4$ xlC -qarch=pwr7 -qaltivec -c adhoc.cpp -bash-4.4$ xlC -qarch=pwr8 -qaltivec -c adhoc.cpp -bash-4.4$

The new behavior causes some configure's to produce incorrect results (like ours):

if (Power4); then if (Power7); then if (Power8); then ... fi fi fi


GCC119/AIX machine:

-bash-4.4$ xlC -qversion IBM XL C/C++ for AIX, V13.1.3 (5725-C72, 5765-J07) Version: 13.01.0003.0004

GCC112/Linux machine:

$ xlC -qversion IBM XL C/C++ for Linux, V13.1.6 (Community Edition) Version: 13.01.0006.0001

noloader avatar Jul 31 '18 04:07 noloader

I guessed your platform for GCC1128 is Linux LE, which is using the ABIv2 https://openpowerfoundation.org/?resource_lib=64-bit-elf-v2-abi-specification-power-architecture and it's only available for Power8 and up. That's why XLC on Linux LE emits the error.

AIX XLC (BE) used to support pwr4, pwr7 and pwr8 (latest version pwr9), so it's fine when those specified and they works.

jedilyn avatar Sep 10 '18 09:09 jedilyn

... The new behavior causes some configure's to produce incorrect results (like ours):

if (Power4); then if (Power7); then if (Power8); then ... fi fi fi

This is interesting in a morbid sort of way. We no longer have PWR4 and PW7. That means some source files that use builtins/intrinsics will be compiled with the wrong ISA because the only ISA available is PWR8. That will probably cause problems for several sources files written for PWR4 and PWR7 (which is no longer safe to run on PWR5, PWR6 and PWR7 because of the PWR8 code generation).

noloader avatar Jul 31 '18 07:07 noloader