Home | History | Annotate | Download | only in Hexagon
      1 ; RUN: llc -march=hexagon < %s | FileCheck %s
      2 ; CHECK: r{{[0-9]+}} = sub(r{{[0-9]+}}.{{L|l}},r{{[0-9]+}}.{{L|l}})
      3 
      4 ; Function Attrs: nounwind readnone
      5 define i64 @f0(i64 %a0, i16 zeroext %a1, i16 zeroext %a2) #0 {
      6 b0:
      7   %v0 = zext i16 %a1 to i32
      8   %v1 = zext i16 %a2 to i32
      9   %v2 = sub nsw i32 %v0, %v1
     10   %v3 = shl i32 %v2, 16
     11   %v4 = icmp slt i32 %v3, 65536
     12   %v5 = ashr exact i32 %v3, 16
     13   %v6 = select i1 %v4, i32 1, i32 %v5
     14   %v7 = icmp sgt i32 %v6, 4
     15   %v8 = add i32 %v6, 65535
     16   %v9 = shl i64 %a0, 2
     17   %v10 = and i32 %v8, 65535
     18   %v11 = zext i32 %v10 to i64
     19   %v12 = select i1 %v7, i64 3, i64 %v11
     20   %v13 = or i64 %v12, %v9
     21   ret i64 %v13
     22 }
     23 
     24 attributes #0 = { nounwind readnone }
     25