LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 31177 - PowerPC: soft-float commit breaks Linux kernel build
Summary: PowerPC: soft-float commit breaks Linux kernel build
Status: RESOLVED WONTFIX
Alias: None
Product: libraries
Classification: Unclassified
Component: Backend: PowerPC (show other bugs)
Version: trunk
Hardware: PC Linux
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-28 00:19 PST by Anton Blanchard
Modified: 2021-04-12 19:51 PDT (History)
8 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Blanchard 2016-11-28 00:19:36 PST
The recent patch to enable soft-float support on PPC64 ("[PowerPC] Refactor soft-float support, and enable PPC64 soft float") has broken Linux kernel builds.

We want to avoid floating point in the kernel, but certain files want to be built with vectorisation. One example is arch/powerpc/lib/xor_vmx.c.

The command line on these files contains the somewhat convoluted:

-msoft-float -mno-altivec -mno-vsx -maltivec -mabi=altivec

There are only two files in the kernel that use altivec in C, so perhaps we can come up with a way to solve this in the kernel.
Comment 1 Hal Finkel 2016-11-28 05:22:18 PST
These files use only integer vector operations, correct?
Comment 2 Anton Blanchard 2016-11-29 16:53:00 PST
Hi Hal, yes it is RAID5 and RAID6 code that just uses vec_xor, vec_and, vec_cmpgt.
Comment 3 Nemanja Ivanovic 2016-11-30 07:38:53 PST
Can you elaborate a bit on what breaks and how it breaks? I am not certain from the description and comments so far whether we need to take any action in LLVM to fix the issue.
Comment 4 Hal Finkel 2016-11-30 08:20:53 PST
(In reply to comment #3)
> Can you elaborate a bit on what breaks and how it breaks? I am not certain
> from the description and comments so far whether we need to take any action
> in LLVM to fix the issue.

We currently disable Altivec/VSX support when enabling soft-float. This is because our Altivec lowering promotes various operations to act on v4f32. I don't know why this was done, but I assume it was an arbitrary choice. We'd need to change these promotions (and the associated TableGen patterns, etc.) to work on, say, v4i32 instead. Then we can allow the (non-floating-point) vector instruction selection to proceed even when floating-point support is disabled.
Comment 5 Nick Desaulniers 2018-11-04 18:43:31 PST
Hello, this issue is blocking compiling the Linux kernel with Clang for ppc. Anything we can do to help move this along?
Comment 6 Nemanja Ivanovic 2020-05-26 05:18:49 PDT
It seems that this dropped off the radar. Is this still an issue? If not, can we close the PR?
Comment 7 Nemanja Ivanovic 2021-04-12 19:51:26 PDT
No comments on this for over 2 years other than me asking whether it is still a problem. Closing this as it is likely not a problem and if it is still an issue, please reopen and provide a reproducer.