File: arm64-regress-interphase-shift.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 (33 lines) | stat: -rw-r--r-- 1,074 bytes parent folder | download | duplicates (12)
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
; RUN: llc < %s -mtriple=arm64-eabi | FileCheck %s

; This is mostly a "don't assert" test. The type of the RHS of a shift depended
; on the phase of legalization, which led to the creation of an unexpected and
; unselectable "rotr" node: (i32 (rotr i32, i64)).

; FIXME: This test is xfailed because it relies on an optimization that has
; been reverted (see PR17975).
; XFAIL: *

define void @foo(ptr nocapture %d) {
; CHECK-LABEL: foo:
; CHECK: rorv
  %tmp = load i64, ptr undef, align 8
  %sub397 = sub i64 0, %tmp
  %and398 = and i64 %sub397, 4294967295
  %shr404 = lshr i64 %and398, 0
  %or405 = or i64 0, %shr404
  %xor406 = xor i64 %or405, 0
  %xor417 = xor i64 0, %xor406
  %xor428 = xor i64 0, %xor417
  %sub430 = sub i64 %xor417, 0
  %and431 = and i64 %sub430, 4294967295
  %and432 = and i64 %xor428, 31
  %sub433 = sub i64 32, %and432
  %shl434 = shl i64 %and431, %sub433
  %shr437 = lshr i64 %and431, %and432
  %or438 = or i64 %shl434, %shr437
  %xor439 = xor i64 %or438, %xor428
  %sub441 = sub i64 %xor439, 0
  store i64 %sub441, ptr %d, align 8
  ret void
}