Home | History | Annotate | Download | only in X86
      1 ; RUN: llc -mattr=-bmi < %s -mtriple=x86_64-linux | FileCheck %s
      2 
      3 ; LLVM creates virtual registers for values live across blocks
      4 ; based on the type of the value. Make sure that the extracts
      5 ; here use the GR64_NOREX register class for their result,
      6 ; instead of plain GR64.
      7 
      8 ; CHECK: foo:
      9 ; CHECK: movzbl %{{[abcd]}}h, %e
     10 ; CHECK: movzbl %{{[abcd]}}h, %e
     11 ; CHECK: movzbl %{{[abcd]}}h, %e
     12 ; CHECK: movzbl %{{[abcd]}}h, %e
     13 ; CHECK: movzbl %{{[abcd]}}h, %e
     14 ; CHECK: movzbl %{{[abcd]}}h, %e
     15 ; CHECK: movzbl %{{[abcd]}}h, %e
     16 ; CHECK: movzbl %{{[abcd]}}h, %e
     17 ; CHECK: ret
     18 
     19 define i64 @foo(i64 %a, i64 %b, i64 %c, i64 %d,
     20                 i64 %e, i64 %f, i64 %g, i64 %h) {
     21   %sa = lshr i64 %a, 8
     22   %A = and i64 %sa, 255
     23   %sb = lshr i64 %b, 8
     24   %B = and i64 %sb, 255
     25   %sc = lshr i64 %c, 8
     26   %C = and i64 %sc, 255
     27   %sd = lshr i64 %d, 8
     28   %D = and i64 %sd, 255
     29   %se = lshr i64 %e, 8
     30   %E = and i64 %se, 255
     31   %sf = lshr i64 %f, 8
     32   %F = and i64 %sf, 255
     33   %sg = lshr i64 %g, 8
     34   %G = and i64 %sg, 255
     35   %sh = lshr i64 %h, 8
     36   %H = and i64 %sh, 255
     37   br label %next
     38 
     39 next:
     40   %u = add i64 %A, %B
     41   %v = add i64 %C, %D
     42   %w = add i64 %E, %F
     43   %x = add i64 %G, %H
     44   %y = add i64 %u, %v
     45   %z = add i64 %w, %x
     46   %t = add i64 %y, %z
     47   ret i64 %t
     48 }
     49