blob: 943efa88c22ad6188192ec676cee90854bc54fb9 [file] [edit]
; Test "llvm.loop.vectorize.predicate.enable" /
; "llvm.loop.vectorize.predicate.disable" single-operand validation.
; DEFINE: %{VERIFY} = llvm-as -disable-output %t 2>&1
define void @test() {
entry:
br label %body
body:
br i1 0, label %body, label %exit, !llvm.loop !0
exit:
ret void
}
!0 = distinct !{!0, !1}
; BAD: Expecting only the metadata name
; Single-operand enable.
; RUN: cat %s > %t
; RUN: echo '!1 = !{!"llvm.loop.vectorize.predicate.enable"}' >> %t
; RUN: %{VERIFY}
; Single-operand disable.
; RUN: cat %s > %t
; RUN: echo '!1 = !{!"llvm.loop.vectorize.predicate.disable"}' >> %t
; RUN: %{VERIFY}
; Two-operand enable with boolean false (legacy form, now rejected).
; RUN: cat %s > %t
; RUN: echo '!1 = !{!"llvm.loop.vectorize.predicate.enable", i1 0}' >> %t
; RUN: not %{VERIFY} | FileCheck %s -check-prefix=BAD
; Two-operand enable with boolean true (legacy form, now rejected).
; RUN: cat %s > %t
; RUN: echo '!1 = !{!"llvm.loop.vectorize.predicate.enable", i1 1}' >> %t
; RUN: not %{VERIFY} | FileCheck %s -check-prefix=BAD
; Two-operand disable (rejected).
; RUN: cat %s > %t
; RUN: echo '!1 = !{!"llvm.loop.vectorize.predicate.disable", i1 0}' >> %t
; RUN: not %{VERIFY} | FileCheck %s -check-prefix=BAD