Previously we effectively took the absolute value of the APSInt, instead diagnose the unexpected negative value. Change-Id: I4efe961e7b29fdf1d5f97df12f8139aac12c9219
27 lines
441 B
YAML
27 lines
441 B
YAML
# RUN: not llc -run-pass=none -filetype=null %s 2>&1 | FileCheck %s
|
|
|
|
# Stand in as a test of all uses of MIParser::getUnsigned to ensure it
|
|
# rejects negative integers.
|
|
|
|
--- |
|
|
|
|
define i32 @foo(i32 %a) {
|
|
entry:
|
|
%0 = icmp sle i32 %a, 10
|
|
br label %foo
|
|
|
|
foo:
|
|
ret i32 0
|
|
}
|
|
|
|
...
|
|
---
|
|
name: foo
|
|
body: |
|
|
bb.0.entry:
|
|
; CHECK: [[@LINE+1]]:27: expected unsigned integer
|
|
successors: %bb.1.foo(-2)
|
|
|
|
bb.1.foo:
|
|
...
|