1 ; RUN: llvm-as < %s | llc -march=bfin > %t
3 ; Assertion failed: (isUsed(Reg) && "Using an undefined register!"),
4 ; function forward, file RegisterScavenging.cpp, line 259.
6 ; The DAG combiner may sometimes create illegal i16 SETCC operations when run
7 ; after LegalizeOps. Try to tease out all the optimizations in
8 ; TargetLowering::SimplifySetCC.
10 @x = external global i16
11 @y = external global i16
13 declare i16 @llvm.ctlz.i16(i16)
15 ; Case (srl (ctlz x), 5) == const
16 ; Note: ctlz is promoted, so this test does not catch the DAG combiner
17 define i1 @srl_ctlz_const() {
19 %c = call i16 @llvm.ctlz.i16(i16 %x)
21 %r = icmp eq i16 %s, 1
25 ; Case (zext x) == const
26 define i1 @zext_const() {
28 %r = icmp ugt i16 %x, 1
32 ; Case (sext x) == const
33 define i1 @sext_const() {
36 %x2 = sext i16 %y to i32
37 %r = icmp ne i32 %x2, -1