Issue 157252
Summary [AArch64] Assertion `!(SetNZCV && (NumPredicateVectors || NumDataVectors)) && "SetNZCV not supported with SVE vectors"' failed at -O1/O2/O3
Labels backend:AArch64, crash-on-valid
Assignees
Reporter XChy
    Reduced testcase:
```llvm
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32"
target triple = "aarch64-buildroot-linux-gnu"

define void @i(ptr %ad, ptr %0) #0 {
entry:
  %aj = alloca i32, align 4
  callbr void asm sideeffect "", "!i,!i"()
          to label %asm.fallthrough [label %ah.preheader.preheader, label %ah.preheader.preheader]

ah.preheader.preheader: ; preds = %entry, %entry
  %conv = xor i8 0, 1
  br label %ah

asm.fallthrough:                                  ; preds = %entry
 unreachable

ah:                                               ; preds = %asm.fallthrough2, %asm.fallthrough2, %ah, %ah.preheader.preheader
  %af.2 = phi <8 x i64> [ zeroinitializer, %asm.fallthrough2 ], [ <i64 4056814946905, i64 0, i64 0, i64 0, i64 0, i64 0, i64 0, i64 0>, %ah.preheader.preheader ], [ zeroinitializer, %asm.fallthrough2 ], [ zeroinitializer, %ah ]
  %vecext = extractelement <8 x i64> %af.2, i64 0
  store i64 %vecext, ptr %ad, align 8
  call void asm sideeffect "", "~{v11}"()
  callbr void asm sideeffect "", "!i"()
          to label %asm.fallthrough2 [label %ah]

asm.fallthrough2:                                 ; preds = %ah
 %call = call i32 @g()
  store i8 %conv, ptr %0, align 1
  %cmp = icmp ne ptr %aj, null
  %conv3 = zext i1 %cmp to i32
  store i32 %conv3, ptr %ad, align 4
  callbr void asm sideeffect "", "!i"()
          to label %ah [label %ah]
}

declare i32 @g(...)

attributes #0 = { "frame-pointer"="non-leaf" "target-features"="+sve" }
```

Godbolt link: https://godbolt.org/z/avYszEcEG
This testcase is reduced from a well-defined C program.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to