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

LLVM 15 regression: LLVM ERROR: cannot select when lowering "vector @splat" behavior test #12827

Open
andrewrk opened this issue Sep 12, 2022 · 1 comment
Labels
arch-x86_64 backend-llvm The LLVM backend outputs an LLVM IR Module. bug Observed behavior contradicts documented or intended behavior os-macos regression It worked in a previous version of Zig, but stopped working. upstream An issue with a third party project that Zig uses.
Milestone

Comments

@andrewrk
Copy link
Member

    LLVM ERROR: Cannot select: 0x7fbada5323a8: v8f16,ch = X86ISD::VBROADCAST_LOAD<(load (s16) from constant-pool)> 0x7fbae24e8678, 0x7fbae36d3cd0, behavior/vector.zig:252:18 @[ behavior/vector.zig:261:25 @[ behavior/vector.zig:283:20 ] ]
      0x7fbae36d3cd0: i64 = X86ISD::WrapperRIP TargetConstantPool:i64<half 0xH4248> 0
        0x7fbae36d36f8: i64 = TargetConstantPool<half 0xH4248> 0
    In function: behavior.vector.test.vector @splat
    error: test...
    error: The following command terminated unexpectedly:
    /Users/runner/work/1/s/build/stage3-release/bin/zig test /Users/runner/work/1/s/test/behavior.zig --test-name-prefix behavior-native-ReleaseSmall--multi-default  -OReleaseSmall --cache-dir /Users/runner/work/1/s/zig-cache --global-cache-dir /Users/runner/.cache/zig --name test -fno-single-threaded -I /Users/runner/work/1/s/test -L /Users/runner/zig+llvm+lld+clang-x86_64-macos-none-0.10.0-dev.60+50aa139d1/lib -isystem /Users/runner/zig+llvm+lld+clang-x86_64-macos-none-0.10.0-dev.60+50aa139d1/include --zig-lib-dir /Users/runner/work/1/s/lib --enable-cache 

Next steps:

  • use llvm-reduce to create a test case
  • file upstream bug report
@andrewrk andrewrk added bug Observed behavior contradicts documented or intended behavior os-macos upstream An issue with a third party project that Zig uses. arch-x86_64 backend-llvm The LLVM backend outputs an LLVM IR Module. regression It worked in a previous version of Zig, but stopped working. labels Sep 12, 2022
@andrewrk andrewrk added this to the 0.11.0 milestone Sep 12, 2022
@andrewrk andrewrk modified the milestones: 0.11.0, 0.12.0 Jun 19, 2023
@fogti
Copy link
Contributor

fogti commented Aug 21, 2023

 * Running ./stage3/bin/zig build test-behavior -Dstatic-llvm=false -Denable-llvm -Dskip-non-native -Doptimize=ReleaseSafe -Dtarget=native -Dcpu=native ...
zig test ReleaseSmall native: error: LLVM ERROR: Cannot select: 0xa1cf330: v8f16,ch = X86ISD::VBROADCAST_LOAD<(load (s16) from constant-pool)> 0x86a13b0, 0xa39b320, vector.zig:305:18 @[ vector.zig:314:25 @[ vector.zig:329:20 ] ]
  0xa39b320: i64 = X86ISD::Wrapper TargetConstantPool:i64<half 0xH4248> 0
    0x5bd5ab0: i64 = TargetConstantPool<half 0xH4248> 0
In function: behavior.vector.test.vector @splat

zig test ReleaseSmall native: error: the following command terminated unexpectedly:
/tmp/portage/dev-lang/zig-0.11.0/work/zig-0.11.0/build/stage3/bin/zig test /tmp/portage/dev-lang/zig-0.11.0/work/zig-0.11.0/test/behavior.zig -OReleaseSmall --cache-dir /tmp/portage/dev-lang/zig-0.11.0/work/zig-0.11.0/zig-cache --global-cache-dir /tmp/portage/dev-lang/zig-0.11.0/homedir/.cache/zig --name test -I /tmp/portage/dev-lang/zig-0.11.0/work/zig-0.11.0/test -I /usr/lib/llvm/16/include --zig-lib-dir /tmp/portage/dev-lang/zig-0.11.0/work/zig-0.11.0/lib --listen=- 
zig test ReleaseSmall native: error: LLVM ERROR: Cannot select: 0x91e4010: v8f16,ch = X86ISD::VBROADCAST_LOAD<(load (s16) from constant-pool)> 0x72fd450, 0x8fbef90, vector.zig:305:18 @[ vector.zig:314:25 @[ vector.zig:329:20 ] ]
  0x8fbef90: i64 = X86ISD::WrapperRIP TargetConstantPool:i64<half 0xH4248> 0
    0x8fd8110: i64 = TargetConstantPool<half 0xH4248> 0
In function: behavior.vector.test.vector @splat

zig test ReleaseSmall native: error: the following command terminated unexpectedly:
/tmp/portage/dev-lang/zig-0.11.0/work/zig-0.11.0/build/stage3/bin/zig test /tmp/portage/dev-lang/zig-0.11.0/work/zig-0.11.0/test/behavior.zig -lc -OReleaseSmall --cache-dir /tmp/portage/dev-lang/zig-0.11.0/work/zig-0.11.0/zig-cache --global-cache-dir /tmp/portage/dev-lang/zig-0.11.0/homedir/.cache/zig --name test -I /tmp/portage/dev-lang/zig-0.11.0/work/zig-0.11.0/test -I /usr/lib/llvm/16/include --zig-lib-dir /tmp/portage/dev-lang/zig-0.11.0/work/zig-0.11.0/lib --listen=- 
zig test ReleaseSmall native: error: LLVM ERROR: Cannot select: 0x8438c70: v8f16,ch = X86ISD::VBROADCAST_LOAD<(load (s16) from constant-pool)> 0x651de30, 0x8506990, vector.zig:305:18 @[ vector.zig:314:25 @[ vector.zig:329:20 ] ]
  0x8506990: i64 = X86ISD::Wrapper TargetConstantPool:i64<half 0xH4248> 0
    0x84debb0: i64 = TargetConstantPool<half 0xH4248> 0
In function: behavior.vector.test.vector @splat

zig test ReleaseSmall native: error: the following command terminated unexpectedly:
/tmp/portage/dev-lang/zig-0.11.0/work/zig-0.11.0/build/stage3/bin/zig test /tmp/portage/dev-lang/zig-0.11.0/work/zig-0.11.0/test/behavior.zig -OReleaseSmall --cache-dir /tmp/portage/dev-lang/zig-0.11.0/work/zig-0.11.0/zig-cache --global-cache-dir /tmp/portage/dev-lang/zig-0.11.0/homedir/.cache/zig --name test -fsingle-threaded -I /tmp/portage/dev-lang/zig-0.11.0/work/zig-0.11.0/test -I /usr/lib/llvm/16/include --zig-lib-dir /tmp/portage/dev-lang/zig-0.11.0/work/zig-0.11.0/lib --listen=- 
Build Summary: 29/36 steps succeeded; 3 failed; 23533/25026 tests passed; 1493 skipped (disable with --summary none)
test-behavior transitive failure
├─ run test behavior-native-ReleaseSmall transitive failure
│  └─ zig test ReleaseSmall native failure
├─ run test behavior-native-ReleaseSmall-libc transitive failure
│  └─ zig test ReleaseSmall native failure
└─ run test behavior-native-ReleaseSmall-single transitive failure
   └─ zig test ReleaseSmall native failure
error: the following build command failed with exit code 1:
/tmp/portage/dev-lang/zig-0.11.0/work/zig-0.11.0/zig-cache/o/b5ee962511f85d81f5639c8a45a0fa81/build /tmp/portage/dev-lang/zig-0.11.0/work/zig-0.11.0/build/stage3/bin/zig /tmp/portage/dev-lang/zig-0.11.0/work/zig-0.11.0 /tmp/portage/dev-lang/zig-0.11.0/work/zig-0.11.0/zig-cache /tmp/portage/dev-lang/zig-0.11.0/homedir/.cache/zig test-behavior -Dstatic-llvm=false -Denable-llvm -Dskip-non-native -Doptimize=ReleaseSafe -Dtarget=native -Dcpu=native

this also occurs on
Linux --- 6.4.8-gentoo --- 2023 x86_64 AMD A10-5800K APU with Radeon(tm) HD Graphics AuthenticAMD GNU/Linux

mikdusan added a commit to mikdusan/zig that referenced this issue Feb 24, 2024
- originally disabled per llvm 15 regression manifesting on macos x86_64

closes ziglang#12827
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-x86_64 backend-llvm The LLVM backend outputs an LLVM IR Module. bug Observed behavior contradicts documented or intended behavior os-macos regression It worked in a previous version of Zig, but stopped working. upstream An issue with a third party project that Zig uses.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants