1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=instcombine -S | FileCheck %s
4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 target triple = "x86_64-unknown-linux-gnu"
7 ; Function Attrs: readonly uwtable
8 define i1 @dot_ref_s(ptr noalias nocapture readonly dereferenceable(8)) {
9 ; CHECK-LABEL: @dot_ref_s(
10 ; CHECK-NEXT: entry-block:
11 ; CHECK-NEXT: ret i1 false
14 %loadedptr = load ptr, ptr %0, align 8, !nonnull !0
15 %ptrtoint = ptrtoint ptr %loadedptr to i64
16 %inttoptr = inttoptr i64 %ptrtoint to ptr
17 %switchtmp = icmp eq ptr %inttoptr, null
22 ; Function Attrs: readonly uwtable
23 define ptr @function(ptr noalias nocapture readonly dereferenceable(8)) {
24 ; CHECK-LABEL: @function(
25 ; CHECK-NEXT: entry-block:
26 ; CHECK-NEXT: [[LOADED:%.*]] = load i64, ptr [[TMP0:%.*]], align 8, !range [[RNG0:![0-9]+]]
27 ; CHECK-NEXT: [[INTTOPTR:%.*]] = inttoptr i64 [[LOADED]] to ptr
28 ; CHECK-NEXT: ret ptr [[INTTOPTR]]
31 %loaded = load i64, ptr %0, align 8, !range !1
32 %inttoptr = inttoptr i64 %loaded to ptr
38 !1 = !{i64 1, i64 140737488355327}