Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
      2 ; RUN: llc < %s -mtriple=x86_64-linux-gnux32 | FileCheck %s
      3 ; RUN: llc < %s -mtriple=x86_64-nacl | FileCheck %s
      4 
      5 
      6 define zeroext i16 @t1(i32 %on_off) nounwind {
      7 entry:
      8   %0 = sub i32 %on_off, 1
      9   %1 = mul i32 %0, 2
     10   %2 = trunc i32 %1 to i16
     11   %3 = zext i16 %2 to i32
     12   %4 = trunc i32 %3 to i16
     13 ; CHECK: lea
     14   ret i16 %4
     15 }
     16 
     17 define i32 @t2(i32 %on_off) nounwind {
     18 entry:
     19   %0 = sub i32 %on_off, 1
     20   %1 = mul i32 %0, 2
     21   %2 = and i32 %1, 65535
     22 ; CHECK: lea
     23   ret i32 %2
     24 }
     25