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 44239 - Instruction selection fails for %llvm.ppc.altivec.vct* with a non-zero argument
Summary: Instruction selection fails for %llvm.ppc.altivec.vct* with a non-zero argument
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Backend: PowerPC (show other bugs)
Version: trunk
Hardware: PC Linux
: P normal
Assignee: Colin Samples
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-06 06:46 PST by Colin Samples
Modified: 2019-12-15 18:25 PST (History)
3 users (show)

See Also:
Fixed By Commit(s): rG7e0fd77645cf


Attachments
C reproducer (240 bytes, text/x-csrc)
2019-12-06 06:46 PST, Colin Samples
Details
IR reproducer (1.57 KB, text/plain)
2019-12-06 06:47 PST, Colin Samples
Details
Patch (2.05 KB, patch)
2019-12-06 06:48 PST, Colin Samples
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Samples 2019-12-06 06:46:39 PST
Created attachment 22912 [details]
C reproducer

Use of __builtin_altivec_vctsxs, __builtin_altivec_vctsxs, __builtin_altivec_vctuxs, __builtin_altivec_vcfux with a non-zero immediate argument result in: `LLVM ERROR: Cannot select: intrinsic %llvm.ppc.altivec.vctsxs`.

Attached are C and IR reproducers.

Broken by r372285 (git d8399d12cd8). This commit make similar changes to other architectures, so I wonder if there are any other cases.

The attached patch fixes the issue. Let me know if you want me to work up something more formal to submit for review.
Comment 1 Colin Samples 2019-12-06 06:47:49 PST
Created attachment 22913 [details]
IR reproducer
Comment 2 Colin Samples 2019-12-06 06:48:50 PST
Created attachment 22914 [details]
Patch
Comment 3 Nemanja Ivanovic 2019-12-06 07:59:33 PST
The test case and the fix seem perfectly fine. Would you be interested/able to post the patch with the test case on Phabricator and we can get it reviewed and committed?
Comment 4 Colin Samples 2019-12-06 08:08:23 PST
(In reply to Nemanja Ivanovic from comment #3)
> The test case and the fix seem perfectly fine. Would you be interested/able
> to post the patch with the test case on Phabricator and we can get it
> reviewed and committed?

Will do
Comment 5 Colin Samples 2019-12-06 11:36:35 PST
Differential: https://reviews.llvm.org/D71138