Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r294186 causes llc to consume all memory on PPC #31238

Open
chandlerc opened this issue Feb 7, 2017 · 2 comments
Open

r294186 causes llc to consume all memory on PPC #31238

chandlerc opened this issue Feb 7, 2017 · 2 comments
Labels
bugzilla Issues migrated from bugzilla

Comments

@chandlerc
Copy link
Member

Bugzilla Link 31890
Version unspecified
OS Linux
Attachments Reduced test case
CC @deadalnix,@hfinkel,@RKSimon,@rotateright

Extended Description

The attached test case is reduced out of boringssl's bignumber code (which largely comes from openssl I think). The attached .ll file makes 'llc -o /dev/null' consume all memory pretty quickly for me.

@deadalnix
Copy link
Contributor

Repro case reduced much further:

; ModuleID = ''
source_filename = "bugpoint-output-a3b3e72.bc"
target datalayout = "e-m:e-i64:64-n32:64"
target triple = "powerpc64le-unknown-linux-gnu"

; Function Attrs: norecurse nounwind
define void @​bn_mul_comba8(i64* nocapture %r, i64* nocapture readonly %a, i64* nocapture readonly %b) local_unnamed_addr #​0 {
%1 = load i64, i64* %a, align 8
%conv = zext i64 %1 to i128
%2 = load i64, i64* %b, align 8
%conv2 = zext i64 %2 to i128
%mul = mul nuw i128 %conv2, %conv
%shr = lshr i128 %mul, 64
%agep = getelementptr inbounds i64, i64* %a, i64 1
%3 = load i64, i64* %agep, align 8
%conv14 = zext i64 %3 to i128
%mul15 = mul nuw i128 %conv14, %conv
%add17 = add i128 %mul15, %shr
%shr19 = lshr i128 %add17, 64
%conv20 = trunc i128 %shr19 to i64
%bgep = getelementptr inbounds i64, i64* %b, i64 1
%4 = load i64, i64* %bgep, align 8
%conv28 = zext i64 %4 to i128
%mul31 = mul nuw i128 %conv28, %conv2
%conv32 = and i128 %add17, 18446744073709551615
%add33 = add i128 %conv32, %mul31
%shr35 = lshr i128 %add33, 64
%conv36 = trunc i128 %shr35 to i64
%add37 = add i64 %conv36, %conv20
%cmp38 = icmp ult i64 %add37, %conv36
%conv148 = zext i1 %cmp38 to i64
store i64 %conv148, i64* %r, align 8
ret void
}

attributes #​0 = { norecurse nounwind }

@deadalnix
Copy link
Contributor

Faulty DAG
And the faulty DAG. It seems like the problem is that some glue is not schedulable. Any idea how to fix this ? What are other backend doing ?

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

2 participants