1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/test/Transforms/InstCombine/constant-fold-hang.ll
Owen Anderson c22a907f78 Fix an infinite loop in InstCombine when an instruction with no users and side effects can be constant folded.
ReplaceInstUsesWith needs to return nullptr when the input has no users,
because in that case it does not mutate the program.  Otherwise, we can
get stuck in an infinite loop of repeatedly attempting to constant fold
and instruction with no users.

llvm-svn: 231755
2015-03-10 05:13:47 +00:00

15 lines
420 B
LLVM

; RUN: opt -instcombine < %s
; Function Attrs: nounwind readnone ssp
define void @mulByZero(<4 x i16> %x) #0 {
entry:
%a = tail call <4 x i32> @llvm.arm.neon.vmulls.v4i32(<4 x i16> %x, <4 x i16> zeroinitializer) #2
ret void
}
; Function Attrs: nounwind readnone
declare <4 x i32> @llvm.arm.neon.vmulls.v4i32(<4 x i16>, <4 x i16>) #1
attributes #0 = { nounwind readnone ssp }
attributes #1 = { nounwind readnone }