File: pr41164.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (36 lines) | stat: -rw-r--r-- 1,471 bytes parent folder | download | duplicates (6)
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
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -instcombine -S | FileCheck %s

@wyhash64_x = global i64 0, align 8

define i64 @_Z8wyhash64v() {
; CHECK-LABEL: @_Z8wyhash64v(
; CHECK-NEXT:    [[TMP1:%.*]] = load i64, i64* @wyhash64_x, align 8
; CHECK-NEXT:    [[TMP2:%.*]] = add i64 [[TMP1]], 6971258582664805397
; CHECK-NEXT:    store i64 [[TMP2]], i64* @wyhash64_x, align 8
; CHECK-NEXT:    [[TMP3:%.*]] = zext i64 [[TMP2]] to i128
; CHECK-NEXT:    [[TMP4:%.*]] = mul nuw i128 [[TMP3]], 11795372955171141389
; CHECK-NEXT:    [[TMP5:%.*]] = lshr i128 [[TMP4]], 64
; CHECK-NEXT:    [[DOTMASKED:%.*]] = and i128 [[TMP4]], 18446744073709551615
; CHECK-NEXT:    [[TMP6:%.*]] = xor i128 [[TMP5]], [[DOTMASKED]]
; CHECK-NEXT:    [[TMP7:%.*]] = mul nuw nsw i128 [[TMP6]], 1946526487930394057
; CHECK-NEXT:    [[TMP8:%.*]] = lshr i128 [[TMP7]], 64
; CHECK-NEXT:    [[TMP9:%.*]] = xor i128 [[TMP8]], [[TMP7]]
; CHECK-NEXT:    [[TMP10:%.*]] = trunc i128 [[TMP9]] to i64
; CHECK-NEXT:    ret i64 [[TMP10]]
;
  %1 = load i64, i64* @wyhash64_x, align 8
  %2 = add i64 %1, 6971258582664805397
  store i64 %2, i64* @wyhash64_x, align 8
  %3 = zext i64 %2 to i128
  %4 = mul i128 %3, 11795372955171141389
  %5 = lshr i128 %4, 64
  %6 = xor i128 %5, %4
  %7 = trunc i128 %6 to i64
  %8 = zext i64 %7 to i128
  %9 = mul i128 %8, 1946526487930394057
  %10 = lshr i128 %9, 64
  %11 = xor i128 %10, %9
  %12 = trunc i128 %11 to i64
  ret i64 %12
}