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