brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 335038e Raw
46 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52; RUN: llc -mtriple=powerpc64le < %s | FileCheck %s3 4; Tests from pr850665define i64 @test_shl_zext_cttz(i16 %x) {6; CHECK-LABEL: test_shl_zext_cttz:7; CHECK:       # %bb.0: # %entry8; CHECK-NEXT:    oris 3, 3, 19; CHECK-NEXT:    neg 4, 310; CHECK-NEXT:    and 3, 3, 411; CHECK-NEXT:    clrldi 3, 3, 3212; CHECK-NEXT:    blr13entry:14  %cttz = tail call i16 @llvm.cttz.i16(i16 %x, i1 false)15  %zext = zext i16 %cttz to i6416  %res = shl i64 1, %zext17  ret i64 %res18}19 20define i64 @test_shl_zext_cttz_zero_is_poison(i16 %x) {21; CHECK-LABEL: test_shl_zext_cttz_zero_is_poison:22; CHECK:       # %bb.0: # %entry23; CHECK-NEXT:    neg 4, 324; CHECK-NEXT:    and 3, 3, 425; CHECK-NEXT:    clrldi 3, 3, 3226; CHECK-NEXT:    blr27entry:28  %cttz = tail call i16 @llvm.cttz.i16(i16 %x, i1 true)29  %zext = zext i16 %cttz to i6430  %res = shl i64 1, %zext31  ret i64 %res32}33 34define i16 @test_shl_trunc_cttz(i32 %x) {35; CHECK-LABEL: test_shl_trunc_cttz:36; CHECK:       # %bb.0: # %entry37; CHECK-NEXT:    neg 4, 338; CHECK-NEXT:    and 3, 3, 439; CHECK-NEXT:    blr40entry:41  %cttz = tail call i32 @llvm.cttz.i32(i32 %x, i1 false)42  %trunc = trunc i32 %cttz to i1643  %res = shl i16 1, %trunc44  ret i16 %res45}46