Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s -march=x86 -fixup-byte-word-insts=0 | FileCheck %s -check-prefix=CHECK -check-prefix=BWOFF
      2 ; RUN: llc < %s -march=x86 -fixup-byte-word-insts=1 | FileCheck %s -check-prefix=CHECK -check-prefix=BWON
      3 ; These transforms are turned off for load volatiles and stores.
      4 ; Check that they weren't turned off for all loads and stores!
      5 ; CHECK-LABEL: f:
      6 ; CHECK-NOT: movsd
      7 ; BWOFF: movw
      8 ; BWON:  movzwl
      9 ; CHECK: addw
     10 
     11 @atomic = global double 0.000000e+00		; <double*> [#uses=1]
     12 @atomic2 = global double 0.000000e+00		; <double*> [#uses=1]
     13 @ioport = global i32 0		; <i32*> [#uses=1]
     14 @ioport2 = global i32 0		; <i32*> [#uses=1]
     15 
     16 define i16 @f(i64 %x) {
     17 	%b = bitcast i64 %x to double		; <double> [#uses=1]
     18 	store double %b, double* @atomic
     19 	store double 0.000000e+00, double* @atomic2
     20 	%l = load i32, i32* @ioport		; <i32> [#uses=1]
     21 	%t = trunc i32 %l to i16		; <i16> [#uses=1]
     22 	%l2 = load i32, i32* @ioport2		; <i32> [#uses=1]
     23 	%tmp = lshr i32 %l2, 16		; <i32> [#uses=1]
     24 	%t2 = trunc i32 %tmp to i16		; <i16> [#uses=1]
     25 	%f = add i16 %t, %t2		; <i16> [#uses=1]
     26 	ret i16 %f
     27 }
     28