Files
clang-p2996/llvm/test/Transforms/SROA/pointer-offset-size.ll
Nikita Popov 60a32157a5 [Tests] Remove unnecessary bitcasts from opaque pointer tests (NFC)
Previously left these behind due to the required instruction
renumbering, drop them now. This more accurately represents
opaque pointer input IR.

Also drop duplicate opaque pointer check lines in one SROA test.
2022-06-22 14:15:46 +02:00

24 lines
848 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -passes=sroa -S | FileCheck %s
target datalayout = "e-p:64:64:64:32"
%struct.test = type { %struct.basic, %struct.basic }
%struct.basic = type { i16, i8 }
define i16 @test(ptr %ts2.i) {
; CHECK-LABEL: @test(
; CHECK-NEXT: entry:
; CHECK-NEXT: [[S_SROA_0:%.*]] = alloca [3 x i8], align 8
; CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 1 [[TS2_I:%.*]], ptr align 8 [[S_SROA_0]], i32 3, i1 false)
; CHECK-NEXT: [[TMP1:%.*]] = load i16, ptr [[TS2_I]], align 2
; CHECK-NEXT: ret i16 [[TMP1]]
;
entry:
%s = alloca %struct.test
call void @llvm.memcpy.p0.p0.i32(ptr %ts2.i, ptr %s, i32 3, i1 false)
%0 = load i16, ptr %ts2.i
ret i16 %0
}
declare void @llvm.memcpy.p0.p0.i32(ptr nocapture writeonly, ptr nocapture readonly, i32, i1)