File: xor3-i1-const.ll

package info (click to toggle)
llvm-toolchain-13 1%3A13.0.1-6~deb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,418,812 kB
  • sloc: cpp: 5,290,827; ansic: 996,570; asm: 544,593; python: 188,212; objc: 72,027; lisp: 30,291; f90: 25,395; sh: 24,900; javascript: 9,780; pascal: 9,398; perl: 7,484; ml: 5,432; awk: 3,523; makefile: 2,892; xml: 953; cs: 573; fortran: 539
file content (23 lines) | stat: -rw-r--r-- 962 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
; RUN: llc -march=amdgcn -mcpu=bonaire -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s

; This test used to crash
; GCN-LABEL: {{^}}xor3_i1_const:
; GCN: s_xor_b64 s[{{[0-9:]+}}], s[{{[0-9:]+}}], -1
; GCN: s_xor_b64 s[{{[0-9:]+}}], s[{{[0-9:]+}}], -1
define amdgpu_ps float @xor3_i1_const(float inreg %arg1, i32 inreg %arg2) {
main_body:
  %tmp26 = fcmp nsz olt float %arg1, 0.000000e+00
  %tmp28 = call nsz float @llvm.amdgcn.interp.p2(float undef, float undef, i32 0, i32 0, i32 %arg2)
  %tmp29 = fcmp nsz olt float %arg1, 5.700000e+01
  %tmp31 = fcmp nsz olt float %tmp28, 0.000000e+00
  %.demorgan = and i1 %tmp26, %tmp29
  %tmp34 = xor i1 %.demorgan, true
  %tmp35 = and i1 %tmp31, %tmp34
  %tmp36 = xor i1 %tmp35, true
  %tmp37 = xor i1 %.demorgan, %tmp36
  %tmp42 = or i1 %tmp37, %tmp35
  %tmp43 = select i1 %tmp42, float 1.000000e+00, float 0.000000e+00
  ret float %tmp43
}

declare float @llvm.amdgcn.interp.p2(float, float, i32, i32, i32)