Files
clang-p2996/llvm/test/Verifier/range-attr.ll
Andreas Jonson 40282674e9 Reapply [IR] Add new Range attribute using new ConstantRange Attribute type (#84617)
The only change from https://github.com/llvm/llvm-project/pull/83171 is the
change of the allocator so the destructor is called for
ConstantRangeAttributeImpl.

reverts https://github.com/llvm/llvm-project/pull/84549
2024-03-09 19:47:43 +08:00

20 lines
588 B
LLVM

; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
; CHECK: Range bit width must match type bit width!
; CHECK-NEXT: ptr @bit_widths_do_not_match
define void @bit_widths_do_not_match(i32 range(i8 1, 0) %a) {
ret void
}
; CHECK: Range bit width must match type bit width!
; CHECK-NEXT: ptr @bit_widths_do_not_match_vector
define void @bit_widths_do_not_match_vector(<4 x i32> range(i8 1, 0) %a) {
ret void
}
; CHECK: Attribute 'range(i8 1, 0)' applied to incompatible type!
; CHECK-NEXT: ptr @not-integer-type
define void @not-integer-type(ptr range(i8 1, 0) %a) {
ret void
}