llvm.org GIT mirror llvm / 117b137
[NFC] Update the test to check the endianness after the CodeGenPrepare instead of checking the assembly instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362471 91177308-0d34-0410-b5e6-96231b3b80d8 QingShan Zhang 3 months ago
1 changed file(s) with 15 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
0 ; Test that CodeGenPrepare respects endianness when splitting a store.
11 ;
2 ; RUN: llc -mtriple=s390x-linux-gnu -mcpu=z13 -force-split-store < %s | FileCheck %s
2 ; RUN: llc -mtriple=s390x-linux-gnu -mcpu=z13 -stop-after codegenprepare -force-split-store < %s | FileCheck %s
33
44 define void @fun(i16* %Src, i16* %Dst) {
5 ; CHECK-LABEL: # %bb.0:
6 ; CHECK: lh %r0, 0(%r2)
7 ; CHECK-NEXT: stc %r0, 1(%r3)
8 ; CHECK-NEXT: srl %r0, 8
9 ; CHECK-NEXT: stc %r0, 0(%r3)
10 ; CHECK-NEXT: br %r14
5 ; CHECK-LABEL: @fun(
6 ; CHECK: %1 = load i16, i16* %Src
7 ; CHECK-NEXT: %2 = trunc i16 %1 to i8
8 ; CHECK-NEXT: %3 = lshr i16 %1, 8
9 ; CHECK-NEXT: %4 = trunc i16 %3 to i8
10 ; CHECK-NEXT: %5 = zext i8 %2 to i16
11 ; CHECK-NEXT: %6 = zext i8 %4 to i16
12 ; CHECK-NEXT: %7 = shl nuw i16 %6, 8
13 ; CHECK-NEXT: %8 = or i16 %7, %5
14 ; CHECK-NEXT: %9 = bitcast i16* %Dst to i8*
15 ; CHECK-NEXT: %10 = getelementptr i8, i8* %9, i32 1
16 ; CHECK-NEXT: store i8 %2, i8* %10
17 ; CHECK-NEXT: %11 = bitcast i16* %Dst to i8*
18 ; CHECK-NEXT: store i8 %4, i8* %11
1119 %1 = load i16, i16* %Src
1220 %2 = trunc i16 %1 to i8
1321 %3 = lshr i16 %1, 8