Skip to content

[hexagon] Cannot select: f64 = bitcast v2i32, Eigen packetmath #195495

@androm3da

Description

@androm3da

22.1.4 clang fails with Cannot select ... when building eigen/test/packetmath_generic_16.cpp from Eigen.

void packetmath<std::complex<float>, Eigen::internal::complex_packet_wrapper<float, 2>>()

Crash dumped these outputs:

Error output:

LLVM ERROR: Cannot select: t3: f64 = bitcast t2
  t2: v2i32,ch = CopyFromReg t0, Register:v2i32 %1
In function: f
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/
Stack dump:
0.  Program arguments: llc -mtriple=hexagon -mcpu=hexagonv68 -O3 packetmath_reduced.ll
1.  Running pass 'Function Pass Manager' on module 'packetmath_reduced.ll'.
2.  Running pass 'Hexagon DAG->DAG Pattern Instruction Selection' on function '@f'

Reduced via llvm-reduce to:

llc -mtriple=hexagon -mcpu=hexagonv68 -O3 packetmath_reduced.ll -o /dev/null
target datalayout = "e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048"
target triple = "hexagon-unknown-linux-musl"

define <2 x i1> @f(<4 x i32> %and.i149.i.i) {
entry:
  %0 = bitcast <4 x i32> %and.i149.i.i to <2 x double>
  %cmp.i.i159.i.i = fcmp une <2 x double> %0, zeroinitializer
  ret <2 x i1> %cmp.i.i159.i.i
}

Likely introduced in f97fdf5.

Potential fix: 0001-Hexagon-Add-missing-bitcast-patterns-between-float-a.patch.txt

Metadata

Metadata

Assignees

Type

No fields configured for Bug.

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions