1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=nary-reassociate -S | FileCheck %s
4 target datalayout = "e-p:64:64-p1:32:32:32-p2:128:128:128:32-i64:64-v16:16-v32:32-n32:64"
6 ; Even though addrspace(2) has 128 bit pointers, no sign extension needed
7 ; becasue it has 32-bit offsets.
8 define void @no_sext_fat_pointer(ptr addrspace(2) %a, i32 %i, i32 %j) {
9 ; CHECK-LABEL: @no_sext_fat_pointer(
10 ; CHECK-NEXT: [[V2:%.*]] = getelementptr float, ptr addrspace(2) [[A:%.*]], i32 [[I:%.*]]
11 ; CHECK-NEXT: call void @foo(ptr addrspace(2) [[V2]])
12 ; CHECK-NEXT: [[V3:%.*]] = getelementptr float, ptr addrspace(2) [[V2]], i32 [[J:%.*]]
13 ; CHECK-NEXT: call void @foo(ptr addrspace(2) [[V3]])
14 ; CHECK-NEXT: ret void
17 %v2 = getelementptr float, ptr addrspace(2) %a, i32 %i
18 call void @foo(ptr addrspace(2) %v2)
19 %v3 = getelementptr float, ptr addrspace(2) %a, i32 %v1
20 call void @foo(ptr addrspace(2) %v3)
24 declare void @foo(ptr addrspace(2))