<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - [InstCombine] Null-dereference READ in llvm::ConstantVector::getImpl"
href="https://bugs.llvm.org/show_bug.cgi?id=51824">51824</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[InstCombine] Null-dereference READ in llvm::ConstantVector::getImpl
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Scalar Optimizations
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>llvm-dev@redking.me.uk
</td>
</tr>
<tr>
<th>CC</th>
<td>lebedev.ri@gmail.com, llvm-bugs@lists.llvm.org, spatel+llvm@rotateright.com
</td>
</tr></table>
<p>
<div>
<pre>Reduced from <a href="https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38057">https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38057</a>
; ModuleID = 'bugpoint-reduced-simplified.bc'
source_filename = "llvm/test/Transforms/InstCombine/pr38984.ll"
target datalayout = "p:16:16"
target triple = "x86_64-unknown-linux-gnu"
define void @PR38984() {
entry:
%C7 = icmp sgt i1 false, true
%B2 = lshr i16 -32768, 0
%C1 = icmp uge i16 %B2, %B2
%E9 = extractelement <4 x i16> zeroinitializer, i16 %B2
%I2 = insertelement <4 x i16> undef, i16 %E9, i16 0
%i = sext <4 x i16> %I2 to <4 x i32>
%i1 = getelementptr inbounds i64, i64* null, <4 x i32> %i
%i2 = ptrtoint <4 x i64*> %i1 to <4 x i32>
%E2 = extractelement <4 x i32> %i2, i16 0
br label %BB
BB: ; preds = %BB, %entry
%A15 = alloca <4 x i32>, align 16
%L2 = load <4 x i32>, <4 x i32>* %A15, align 16
%G1 = getelementptr i64, i64* null, i32 %E2
%i3 = getelementptr inbounds i64, i64* %G1, <4 x i16> undef
%i4 = ptrtoint <4 x i64*> %i3 to <4 x i32>
%E22 = extractelement <4 x i32> %L2, i1 false
%E8 = extractelement <4 x i32> %i4, i1 false
%I10 = insertelement <4 x i32> undef, i32 undef, i32 %E8
%I19 = insertelement <4 x i32> %I10, i32 %E22, i16 0
%S7 = shufflevector <4 x i32> %I19, <4 x i32> %L2, <4 x i32> undef
%I8 = insertelement <4 x i32> %I19, i32 0, i1 %C1
%E10 = extractelement <4 x i32> %I8, i1 undef
store i32 %E10, i32* undef, align 4
br i1 undef, label %BB, label %BB1
BB1: ; preds = %BB
%S8 = shufflevector <4 x i32> %I10, <4 x i32> %S7, <4 x i32> undef
store <4 x i32> %S8, <4 x i32>* undef, align 16
ret void
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>