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

Broken intrinsic llvm.ppc.cfence.p0sl_s generated #55983

Closed
vchuravy opened this issue Jun 10, 2022 · 4 comments
Closed

Broken intrinsic llvm.ppc.cfence.p0sl_s generated #55983

vchuravy opened this issue Jun 10, 2022 · 4 comments
Assignees
Labels
backend:PowerPC bug Indicates an unexpected problem or unintended behavior

Comments

@vchuravy
Copy link
Contributor

vchuravy commented Jun 10, 2022

; ModuleID = 'bugpoint-reduced-simplified.bc'
source_filename = "text"
target datalayout = "e-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512"
target triple = "powerpc64le-unknown-linux-gnu"

define hidden void @julia_YY.9_25528() #0 {
top:
  br i1 undef, label %err86, label %pass9

pass9:                                            ; preds = %top
  %0 = load atomic {}*, {}** undef acquire, align 8
  unreachable

err86:                                            ; preds = %top
  unreachable
}

attributes #0 = { "target-features" }

!llvm.module.flags = !{!0}

!0 = !{i32 2, !"Debug Info Version", i32 3}

llc 13&14 fails with:

Intrinsic has incorrect argument type!
void ({}*)* @llvm.ppc.cfence.p0sl_s
in function julia_YY.9_25528
LLVM ERROR: Broken function found, compilation aborted!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: usr/tools/llc as0.ll
1.	Running pass 'Function Pass Manager' on module 'as0.ll'.
2.	Running pass 'Module Verifier' on function '@julia_YY.9_25528'
@vchuravy vchuravy added bug Indicates an unexpected problem or unintended behavior backend:PowerPC labels Jun 10, 2022
@llvmbot
Copy link
Collaborator

llvmbot commented Jun 10, 2022

@llvm/issue-subscribers-bug

@llvmbot
Copy link
Collaborator

llvmbot commented Jun 10, 2022

@llvm/issue-subscribers-backend-powerpc

@bzEq bzEq self-assigned this Jun 11, 2022
@bzEq
Copy link
Collaborator

bzEq commented Jun 11, 2022

Posted https://reviews.llvm.org/D127554.

@vchuravy
Copy link
Contributor Author

Thanks! Could you also add a test for JuliaLang/julia#45019 (comment)

@bzEq bzEq closed this as completed in 6710b21 Jun 24, 2022
freebsd-git pushed a commit to freebsd/freebsd-src that referenced this issue Dec 16, 2022
Merge commit 6710b21d4698 from llvm git (by Kai Luo):

  [PowerPC] Allow llvm.ppc.cfence to accept pointer types

  In the context of atomic load, integer, pointer and float point types are allowed, thus we should allow llvm.ppc.cfence to accept any type mentioned.

  Fixes llvm/llvm-project#55983.

  Reviewed By: shchenz, vchuravy

  Differential Revision: https://reviews.llvm.org/D127554

Requested by:	jhibbits
MFC after:	3 days
freebsd-git pushed a commit to freebsd/freebsd-src that referenced this issue Dec 25, 2022
Merge commit 6710b21d4698 from llvm git (by Kai Luo):

  [PowerPC] Allow llvm.ppc.cfence to accept pointer types

  In the context of atomic load, integer, pointer and float point types are allowed, thus we should allow llvm.ppc.cfence to accept any type mentioned.

  Fixes llvm/llvm-project#55983.

  Reviewed By: shchenz, vchuravy

  Differential Revision: https://reviews.llvm.org/D127554

Requested by:	jhibbits
MFC after:	3 days

(cherry picked from commit 4589169)
freebsd-git pushed a commit to freebsd/freebsd-src that referenced this issue Dec 25, 2022
Merge commit 6710b21d4698 from llvm git (by Kai Luo):

  [PowerPC] Allow llvm.ppc.cfence to accept pointer types

  In the context of atomic load, integer, pointer and float point types are allowed, thus we should allow llvm.ppc.cfence to accept any type mentioned.

  Fixes llvm/llvm-project#55983.

  Reviewed By: shchenz, vchuravy

  Differential Revision: https://reviews.llvm.org/D127554

Requested by:	jhibbits
MFC after:	3 days

(cherry picked from commit 4589169)
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this issue Feb 22, 2023
Merge commit 6710b21d4698 from llvm git (by Kai Luo):

  [PowerPC] Allow llvm.ppc.cfence to accept pointer types

  In the context of atomic load, integer, pointer and float point types are allowed, thus we should allow llvm.ppc.cfence to accept any type mentioned.

  Fixes llvm/llvm-project#55983.

  Reviewed By: shchenz, vchuravy

  Differential Revision: https://reviews.llvm.org/D127554

Requested by:	jhibbits
MFC after:	3 days
laffer1 pushed a commit to MidnightBSD/src that referenced this issue Jun 27, 2023
Merge commit 6710b21d4698 from llvm git (by Kai Luo):

  [PowerPC] Allow llvm.ppc.cfence to accept pointer types

  In the context of atomic load, integer, pointer and float point types are allowed, thus we should allow llvm.ppc.cfence to accept any type mentioned.

  Fixes llvm/llvm-project#55983.

  Reviewed By: shchenz, vchuravy

  Differential Revision: https://reviews.llvm.org/D127554

Requested by:	jhibbits
MFC after:	3 days

(cherry picked from commit 4589169768490461995f07713c8e9d7bab6bf277)
bors added a commit to rust-lang-ci/rust that referenced this issue Mar 13, 2024
…li-obk

Only generate a ptrtoint in AtomicPtr codegen when absolutely necessary

This special case was added in this PR: rust-lang#77611 in response to this error message:
```
Intrinsic has incorrect argument type!
void ({}*)* `@llvm.ppc.cfence.p0sl_s`
in function rust_oom
LLVM ERROR: Broken function found, compilation aborted!
[RUSTC-TIMING] std test:false 20.161
error: could not compile `std`
```
But when I tried searching for more information about that intrinsic I found this: llvm/llvm-project#55983 which is a report of someone hitting this same error and a fix was landed in LLVM, 2 years after the above Rust PR.
github-actions bot pushed a commit to rust-lang/miri that referenced this issue Mar 14, 2024
Only generate a ptrtoint in AtomicPtr codegen when absolutely necessary

This special case was added in this PR: rust-lang/rust#77611 in response to this error message:
```
Intrinsic has incorrect argument type!
void ({}*)* `@llvm.ppc.cfence.p0sl_s`
in function rust_oom
LLVM ERROR: Broken function found, compilation aborted!
[RUSTC-TIMING] std test:false 20.161
error: could not compile `std`
```
But when I tried searching for more information about that intrinsic I found this: llvm/llvm-project#55983 which is a report of someone hitting this same error and a fix was landed in LLVM, 2 years after the above Rust PR.
lnicola pushed a commit to lnicola/rust-analyzer that referenced this issue Apr 7, 2024
Only generate a ptrtoint in AtomicPtr codegen when absolutely necessary

This special case was added in this PR: rust-lang/rust#77611 in response to this error message:
```
Intrinsic has incorrect argument type!
void ({}*)* `@llvm.ppc.cfence.p0sl_s`
in function rust_oom
LLVM ERROR: Broken function found, compilation aborted!
[RUSTC-TIMING] std test:false 20.161
error: could not compile `std`
```
But when I tried searching for more information about that intrinsic I found this: llvm/llvm-project#55983 which is a report of someone hitting this same error and a fix was landed in LLVM, 2 years after the above Rust PR.
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this issue Apr 27, 2024
Only generate a ptrtoint in AtomicPtr codegen when absolutely necessary

This special case was added in this PR: rust-lang/rust#77611 in response to this error message:
```
Intrinsic has incorrect argument type!
void ({}*)* `@llvm.ppc.cfence.p0sl_s`
in function rust_oom
LLVM ERROR: Broken function found, compilation aborted!
[RUSTC-TIMING] std test:false 20.161
error: could not compile `std`
```
But when I tried searching for more information about that intrinsic I found this: llvm/llvm-project#55983 which is a report of someone hitting this same error and a fix was landed in LLVM, 2 years after the above Rust PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:PowerPC bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants