Skip to content

Commit

Permalink
GlobalISel: Replace bitcast test pointer usage
Browse files Browse the repository at this point in the history
This won't be meaningful with opaque pointers (I guess we could leave
a ptr to ptr bitcast, or allow same sized address space bitcasts).
  • Loading branch information
arsenm committed Dec 2, 2022
1 parent 8c04c78 commit 9585500
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
Expand Up @@ -284,22 +284,22 @@ define i64* @trivial_bitcast(i8* %a) {
}

; CHECK-LABEL: name: trivial_bitcast_with_copy
; CHECK: [[A:%[0-9]+]]:_(p0) = COPY $x0
; CHECK: [[A:%[0-9]+]]:_(s64) = COPY $d0
; CHECK: G_BR %[[CAST:bb\.[0-9]+]]

; CHECK: [[END:bb\.[0-9]+]].{{[a-zA-Z0-9.]+}}:
; CHECK: $x0 = COPY [[A]]

; CHECK: [[CAST]].{{[a-zA-Z0-9.]+}}:
; CHECK: G_BR %[[END]]
define i64* @trivial_bitcast_with_copy(i8* %a) {
define i64 @trivial_bitcast_with_copy(double %a) {
br label %cast

end:
ret i64* %val
ret i64 %val

cast:
%val = bitcast i8* %a to i64*
%val = bitcast double %a to i64
br label %end
}

Expand Down

0 comments on commit 9585500

Please sign in to comment.