• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s
2
3; PR30661 - https://llvm.org/bugs/show_bug.cgi?id=30661
4
5define i32 @select_i32_neg1_or_0(i1 %a) {
6; CHECK-LABEL: select_i32_neg1_or_0:
7; CHECK:       # %bb.0:
8; CHECK-NEXT:    clrldi 3, 3, 63
9; CHECK-NEXT:    neg 3, 3
10; CHECK-NEXT:    blr
11;
12  %b = sext i1 %a to i32
13  ret i32 %b
14}
15
16define i32 @select_i32_neg1_or_0_zeroext(i1 zeroext %a) {
17; CHECK-LABEL: select_i32_neg1_or_0_zeroext:
18; CHECK:       # %bb.0:
19; CHECK-NEXT:    neg 3, 3
20; CHECK-NEXT:    blr
21;
22  %b = sext i1 %a to i32
23  ret i32 %b
24}
25
26