Files
clang-p2996/llvm/test/CodeGen/AArch64/complex-deinterleaving-crash.ll
Igor Kirillov e2cb07c322 [CodeGen] Fix incorrect insertion point selection for reduction nodes in ComplexDeinterleavingPass
When replacing ComplexDeinterleavingPass::ReductionOperation, we can do it
either from the Real or Imaginary part. The correct way is to take whichever
is later in the BasicBlock, but before the patch, we just always took the
Real part.

Fixes https://github.com/llvm/llvm-project/issues/65044

Differential Revision: https://reviews.llvm.org/D159209
2023-08-31 10:38:01 +00:00

32 lines
1.4 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
; RUN: llc %s --mattr=+complxnum -o - | FileCheck %s
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-ni:1-p2:32:8:8:32-ni:2"
target triple = "aarch64-none-linux-gnu"
; Check that deinterleaving pass doesn't generate broken IR
define void @check_deinterleave_crash() #0 {
; CHECK-LABEL: check_deinterleave_crash:
; CHECK: // %bb.0: // %bb
; CHECK-NEXT: mov x8, xzr
; CHECK-NEXT: str wzr, [x8]
bb:
br label %bb173
bb173: ; preds = %bb173, %bb
%phi177 = phi <2 x i32> [ %add190, %bb173 ], [ zeroinitializer, %bb ]
%phi178 = phi <2 x i32> [ %add187, %bb173 ], [ zeroinitializer, %bb ]
%add185 = add <2 x i32> %phi178, <i32 1, i32 1>
%add186 = add <2 x i32> %phi177, <i32 1, i32 1>
%shufflevector = shufflevector <2 x i32> zeroinitializer, <2 x i32> zeroinitializer, <2 x i32> zeroinitializer
%add187 = add <2 x i32> %add185, %shufflevector
%shufflevector189 = shufflevector <2 x i32> zeroinitializer, <2 x i32> zeroinitializer, <2 x i32> zeroinitializer
%add190 = add <2 x i32> %add186, %shufflevector189
br i1 poison, label %bb193, label %bb173
bb193: ; preds = %bb173
%add194 = or <2 x i32> %add190, %add187
store volatile i32 0, ptr null, align 4
unreachable
}