brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · de3da95 Raw
28 lines · plain
1; RUN: llc < %s -mtriple=i686-- -fixup-byte-word-insts=0 | FileCheck %s -check-prefix=CHECK -check-prefix=BWOFF2; RUN: llc < %s -mtriple=i686-- -fixup-byte-word-insts=1 | FileCheck %s -check-prefix=CHECK -check-prefix=BWON3; 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: movsd7; BWOFF: movw8; BWON:  movzwl9; CHECK: addw10 11@atomic = global double 0.000000e+00		; <ptr> [#uses=1]12@atomic2 = global double 0.000000e+00		; <ptr> [#uses=1]13@ioport = global i32 0		; <ptr> [#uses=1]14@ioport2 = global i32 0		; <ptr> [#uses=1]15 16define i16 @f(i64 %x) {17	%b = bitcast i64 %x to double		; <double> [#uses=1]18	store double %b, ptr @atomic19	store double 0.000000e+00, ptr @atomic220	%l = load i32, ptr @ioport		; <i32> [#uses=1]21	%t = trunc i32 %l to i16		; <i16> [#uses=1]22	%l2 = load i32, ptr @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 %f27}28