Files
clang-p2996/llvm/test/Transforms/InstSimplify/pr33957.ll
Nikita Popov 04b944e230 [InstSimplify] Convert tests to opaque pointers (NFC)
The only interesting test change is in @PR31262, where the following
fold is now performed, while it previously was not:
https://alive2.llvm.org/ce/z/a5Qmr6

llvm/test/Transforms/InstSimplify/ConstProp/gep.ll has not been
updated, because there is a tradeoff between folding and inrange
preservation there that we may want to discuss.

Updates have been performed using:
https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34
2022-06-10 17:16:28 +02:00

30 lines
787 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -loop-unroll -S %s | FileCheck %s
%struct.bar = type { i32 }
@global = external constant [78 x %struct.bar], align 4
define void @patatino(i32 %x) {
; CHECK-LABEL: @patatino(
; CHECK-NEXT: bb:
; CHECK-NEXT: br i1 true, label [[BB1_PREHEADER:%.*]], label [[BB3:%.*]]
; CHECK: bb1.preheader:
; CHECK-NEXT: br label [[BB1:%.*]]
; CHECK: bb1:
; CHECK-NEXT: br label [[BB3]]
; CHECK: bb3:
; CHECK-NEXT: ret void
;
bb:
br i1 true, label %bb1, label %bb3
bb1:
%tmp = getelementptr inbounds [78 x %struct.bar], ptr @global, i32 0, <4 x i32> undef
%tmp2 = getelementptr inbounds %struct.bar, <4 x ptr> %tmp, i32 1
br i1 true, label %bb3, label %bb1
bb3:
ret void
}