Files
clang-p2996/llvm/test/Transforms/InstSimplify/ConstProp/float-to-ptr-cast.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

16 lines
259 B
LLVM

; RUN: opt < %s -passes=instsimplify -S | FileCheck %s
define ptr @test1() {
%X = inttoptr i64 0 to ptr ; <ptr> [#uses=1]
ret ptr %X
}
; CHECK: ret ptr null
define ptr @test2() {
ret ptr null
}
; CHECK: ret ptr null