File: ext-bool-trunc-repl.ll

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (47 lines) | stat: -rw-r--r-- 1,860 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
; RUN: llc -verify-machineinstrs -O0 < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-n32:64"
target triple = "powerpc64le-unknown-linux-gnu"

@c = external global i32, align 4
@d = external global [2 x i32], align 4

; Function Attrs: norecurse nounwind
define void @fn2() #0 {
; CHECK-LABEL: @fn2

  br i1 undef, label %1, label %10

1:                                                ; preds = %0
  br i1 undef, label %3, label %2

2:                                                ; preds = %2, %1
  br i1 undef, label %3, label %2

3:                                                ; preds = %2, %1
  br i1 undef, label %8, label %4

4:                                                ; preds = %4, %3
  %5 = phi i64 [ %6, %4 ], [ undef, %3 ]
  %constexpr = select i1 icmp slt (i16 zext (i1 icmp eq (ptr getelementptr inbounds ([2 x i32], ptr @d, i64 0, i64 1), ptr @c) to i16), i16 0), i32 zext (i1 icmp eq (ptr getelementptr inbounds ([2 x i32], ptr @d, i64 0, i64 1), ptr @c) to i32), i32 lshr (i32 zext (i1 icmp eq (ptr getelementptr inbounds ([2 x i32], ptr @d, i64 0, i64 1), ptr @c) to i32), i32 6)
  %constexpr1 = sext i32 %constexpr to i64
  %constexpr2 = and i64 %constexpr1, %constexpr1
  %constexpr3 = and i64 %constexpr2, %constexpr1
  %constexpr4 = and i64 %constexpr3, %constexpr1
  %constexpr5 = and i64 %constexpr4, %constexpr1
  %constexpr6 = and i64 %constexpr5, %constexpr1
  %constexpr7 = and i64 %constexpr6, %constexpr1
  %constexpr8 = and i64 %constexpr7, %constexpr1
  %6 = and i64 %5, %constexpr8
  %7 = icmp slt i32 undef, 6
  br i1 %7, label %4, label %8

8:                                                ; preds = %4, %3
  %9 = phi i64 [ undef, %3 ], [ %6, %4 ]
  br label %10

10:                                               ; preds = %8, %0
  ret void
}

attributes #0 = { norecurse nounwind "target-cpu"="ppc64le" }