Skip to content

Commit

Permalink
[test][NFC] fix call in test with mismatch in call/decl types
Browse files Browse the repository at this point in the history
  • Loading branch information
nunoplopes committed Sep 14, 2023
1 parent 15a1d28 commit 5eabb02
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions llvm/test/Transforms/InstCombine/alloca-in-non-alloca-as.ll
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@
target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8"
target triple = "amdgcn-amd-amdhsa"

declare void @use(ptr, ptr)
declare void @use(ptr)
declare void @use2(ptr, ptr)

define weak amdgpu_kernel void @__omp_offloading_802_ea0109_main_l8(ptr %a) {
; CHECK-LABEL: @__omp_offloading_802_ea0109_main_l8(
; CHECK-NEXT: .master:
; CHECK-NEXT: [[TMP0:%.*]] = alloca [8 x i8], align 1
; CHECK-NEXT: call void @use(ptr nonnull [[TMP0]], ptr nonnull [[TMP0]])
; CHECK-NEXT: call void @use2(ptr nonnull [[TMP0]], ptr nonnull [[TMP0]])
; CHECK-NEXT: ret void
;
.master:
%0 = alloca i8, i64 8, align 1
store ptr undef, ptr %0, align 8
call void @use(ptr %0, ptr %0)
call void @use2(ptr %0, ptr %0)
ret void
}

Expand All @@ -40,7 +41,7 @@ bb:
define i1 @alloca_addrspace_0_nonnull() {
; CHECK-LABEL: @alloca_addrspace_0_nonnull(
; CHECK-NEXT: [[ALLOCA:%.*]] = alloca i8, align 1
; CHECK-NEXT: call void @use(ptr nonnull [[ALLOCA]], ptr null)
; CHECK-NEXT: call void @use(ptr nonnull [[ALLOCA]])
; CHECK-NEXT: ret i1 true
;
%alloca = alloca i8
Expand Down

0 comments on commit 5eabb02

Please sign in to comment.