1 ; RUN: llc < %s -march=bfin > %t
3 ; The DAG combiner may sometimes create illegal i16 SETCC operations when run
4 ; after LegalizeOps. Try to tease out all the optimizations in
5 ; TargetLowering::SimplifySetCC.
7 @x = external global i16
8 @y = external global i16
10 declare i16 @llvm.ctlz.i16(i16)
12 ; Case (srl (ctlz x), 5) == const
13 ; Note: ctlz is promoted, so this test does not catch the DAG combiner
14 define i1 @srl_ctlz_const() {
16 %c = call i16 @llvm.ctlz.i16(i16 %x)
18 %r = icmp eq i16 %s, 1
22 ; Case (zext x) == const
23 define i1 @zext_const() {
25 %r = icmp ugt i16 %x, 1
29 ; Case (sext x) == const
30 define i1 @sext_const() {
33 %x2 = sext i16 %y to i32
34 %r = icmp ne i32 %x2, -1