
This brings the printing of scalable vector constant splats inline with their fixed length counterparts.
16 lines
622 B
LLVM
16 lines
622 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
|
|
; RUN: opt -S -passes=instcombine < %s | FileCheck %s
|
|
|
|
define <vscale x 2 x i1> @dont_crash(<vscale x 2 x i64> %x) {
|
|
; CHECK-LABEL: define <vscale x 2 x i1> @dont_crash(
|
|
; CHECK-SAME: <vscale x 2 x i64> [[X:%.*]]) {
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[RET:%.*]] = icmp sgt <vscale x 2 x i64> [[X]], splat (i64 -309383)
|
|
; CHECK-NEXT: ret <vscale x 2 x i1> [[RET]]
|
|
;
|
|
entry:
|
|
%div = sdiv <vscale x 2 x i64> %x, splat (i64 309383)
|
|
%ret = icmp sge <vscale x 2 x i64> %div, zeroinitializer
|
|
ret <vscale x 2 x i1> %ret
|
|
}
|