Files
clang-p2996/llvm/test/Transforms/InstSimplify/require-dominator.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

33 lines
750 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -passes=instsimplify
; instsimplify pass should explicitly require DominatorTreeAnalysis
; This test will segfault if DominatorTree is not available
target triple = "x86_64-grtev4-linux-gnu"
; Function Attrs: nounwind uwtable
define void @foo(ptr) #1 align 2 {
br i1 undef, label %exit, label %2
; <label>:2:
%3 = tail call ptr @_Znwm(i64 56) #10
%4 = bitcast ptr %3 to ptr
%p = load ptr, ptr undef, align 8
%5 = icmp eq ptr %p, %4
br i1 %5, label %exit, label %6
; <label>:6:
%7 = icmp eq ptr %p, null
br i1 %7, label %exit, label %8
; <label>:8:
br label %exit
exit:
ret void
}
; Function Attrs: nobuiltin
declare ptr @_Znwm(i64)