1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -gvn -S < %s | FileCheck %s
4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128-ni:4"
5 target triple = "x86_64-unknown-linux-gnu"
7 define void @nipre(double addrspace(4)** noalias %p, i64 addrspace(4)** noalias %p2, i8 %jmp) {
10 ; CHECK: [[PCAST:%.*]] = bitcast double addrspace(4)** [[P:%.*]] to i64 addrspace(4)**
12 ; CHECK: [[L1:%.*]] = load i64 addrspace(4)*, i64 addrspace(4)** [[PCAST]]
13 ; CHECK: [[TMP0:%.*]] = bitcast i64 addrspace(4)* [[L1]] to double addrspace(4)*
15 ; CHECK: [[L2:%.*]] = load i64 addrspace(4)*, i64 addrspace(4)** [[PCAST]]
16 ; CHECK: [[TMP1:%.*]] = bitcast i64 addrspace(4)* [[L2]] to double addrspace(4)*
18 ; CHECK-NEXT: [[L3_PRE:%.*]] = load double addrspace(4)*, double addrspace(4)** %p
21 %pcast = bitcast double addrspace(4)** %p to i64 addrspace(4)**
22 switch i8 %jmp, label %c [ i8 0, label %a
25 %l1 = load i64 addrspace(4)*, i64 addrspace(4)** %pcast
26 store i64 addrspace(4)* %l1, i64 addrspace(4)** %p2
29 %l2 = load i64 addrspace(4)*, i64 addrspace(4)** %pcast
30 store i64 addrspace(4)* %l2, i64 addrspace(4)** %p2
35 %l3 = load double addrspace(4)*, double addrspace(4)** %p
36 %l3cast = bitcast double addrspace(4)* %l3 to i64 addrspace(4)*
37 store i64 addrspace(4)* %l3cast, i64 addrspace(4)** %p2