brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 545b25c Raw
56 lines · plain
1; RUN: llc -mtriple=mips -mcpu=mips32  < %s | FileCheck %s --check-prefixes=ALL,BE2; RUN: llc -mtriple=mipsel -mcpu=mips32  < %s | FileCheck %s --check-prefixes=ALL,LE3 4; Verify visitTRUNCATE respects endianness when transforming trunc to insert_vector_elt.5 6; ALL-LABEL: a:7; BE: lw $2, 4($4)8; LE: lw $2, 0($4)9 10define i32 @a(ptr %a) {11entry:12%0 = load <2 x i32>, ptr %a13%1 = bitcast <2 x i32> %0 to i6414%2 = trunc i64 %1 to i3215ret i32 %216}17 18; ALL-LABEL: b:19; BE: lw $2, 12($4)20; LE: lw $2, 0($4)21 22define i32 @b(ptr %a) {23entry:24%0 = load <4 x i32>, ptr %a25%1 = bitcast <4 x i32> %0 to i12826%2 = trunc i128 %1 to i3227ret i32 %228}29 30 31; Verify visitEXTRACT_VECTOR_ELT respects endianness when transforming extract_vector_elt to a trunc.32 33; ALL-LABEL: c:34; BE: lw $2, 0($4)35; LE: lw $2, 0($4)36 37define i32 @c(ptr %a) {38entry:39%0 = load i64, ptr %a40%1 = bitcast i64 %0 to <2 x i32>41%2 = extractelement <2 x i32> %1, i32 042ret i32 %243}44 45; ALL-LABEL: d:46; BE: lw $2, 4($4)47; LE: lw $2, 4($4)48 49define i32 @d(ptr %a) {50entry:51%0 = load i64, ptr %a52%1 = bitcast i64 %0 to <2 x i32>53%2 = extractelement <2 x i32> %1, i32 154ret i32 %255}56