File: minbitwidth-drop-wrapping-flags.ll

package info (click to toggle)
llvm-toolchain-20 1%3A20.1.6-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,111,304 kB
  • sloc: cpp: 7,438,677; ansic: 1,393,822; asm: 1,012,926; python: 241,650; f90: 86,635; objc: 75,479; lisp: 42,144; pascal: 17,286; sh: 10,027; ml: 5,082; perl: 4,730; awk: 3,523; makefile: 3,349; javascript: 2,251; xml: 892; fortran: 672
file content (44 lines) | stat: -rw-r--r-- 2,096 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
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s

define i32 @test() {
; CHECK-LABEL: define i32 @test() {
; CHECK-NEXT:  entry:
; CHECK-NEXT:    [[A_PROMOTED:%.*]] = load i8, ptr null, align 1
; CHECK-NEXT:    [[TMP10:%.*]] = or i8 [[A_PROMOTED]], 0
; CHECK-NEXT:    [[TMP0:%.*]] = insertelement <4 x i8> poison, i8 [[A_PROMOTED]], i32 0
; CHECK-NEXT:    [[TMP1:%.*]] = shufflevector <4 x i8> [[TMP0]], <4 x i8> poison, <4 x i32> zeroinitializer
; CHECK-NEXT:    [[TMP2:%.*]] = add <4 x i8> [[TMP1]], zeroinitializer
; CHECK-NEXT:    [[TMP3:%.*]] = or <4 x i8> [[TMP1]], zeroinitializer
; CHECK-NEXT:    [[TMP4:%.*]] = shufflevector <4 x i8> [[TMP2]], <4 x i8> [[TMP3]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>
; CHECK-NEXT:    [[TMP5:%.*]] = zext <4 x i8> [[TMP4]] to <4 x i16>
; CHECK-NEXT:    [[TMP6:%.*]] = add <4 x i16> [[TMP5]], <i16 0, i16 -1, i16 0, i16 0>
; CHECK-NEXT:    [[TMP7:%.*]] = call i16 @llvm.vector.reduce.or.v4i16(<4 x i16> [[TMP6]])
; CHECK-NEXT:    [[TMP8:%.*]] = zext i16 [[TMP7]] to i32
; CHECK-NEXT:    [[TMP9:%.*]] = and i32 [[TMP8]], 65535
; CHECK-NEXT:    store i8 [[TMP10]], ptr null, align 1
; CHECK-NEXT:    [[CALL3:%.*]] = tail call i32 (ptr, ...) null(ptr null, i32 [[TMP9]])
; CHECK-NEXT:    ret i32 0
;
entry:
  %a.promoted = load i8, ptr null, align 1
  %dec.4 = add i8 %a.promoted, 0
  %conv.i.4 = zext i8 %dec.4 to i32
  %sub.i.4 = add nuw nsw i32 %conv.i.4, 0
  %dec.5 = add i8 %a.promoted, 0
  %conv.i.5 = zext i8 %dec.5 to i32
  %sub.i.5 = add nuw nsw i32 %conv.i.5, 65535
  %0 = or i32 %sub.i.4, %sub.i.5
  %dec.6 = or i8 %a.promoted, 0
  %conv.i.6 = zext i8 %dec.6 to i32
  %sub.i.6 = add nuw nsw i32 %conv.i.6, 0
  %1 = or i32 %0, %sub.i.6
  %dec.7 = or i8 %a.promoted, 0
  %conv.i.7 = zext i8 %dec.7 to i32
  %sub.i.7 = add nuw nsw i32 %conv.i.7, 0
  %2 = or i32 %1, %sub.i.7
  %3 = and i32 %2, 65535
  store i8 %dec.7, ptr null, align 1
  %call3 = tail call i32 (ptr, ...) null(ptr null, i32 %3)
  ret i32 0
}