<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED --- - [AArch64][FastISel] Generates invalid shift immediate greater than 31 (lsr w10, w8, #32)"
href="http://llvm.org/bugs/show_bug.cgi?id=21594">21594</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[AArch64][FastISel] Generates invalid shift immediate greater than 31 (lsr w10, w8, #32)
</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>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>ASSIGNED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: AArch64
</td>
</tr>
<tr>
<th>Assignee</th>
<td>juergen@apple.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mcrosier@codeaurora.org
</td>
</tr>
<tr>
<th>CC</th>
<td>apazos@codeaurora.org, llvmbugs@cs.uiuc.edu, mcrosier@codeaurora.org, t.p.northover@gmail.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>When running with fast-isel the assembler is complaining about an invalid
immediate value on a shift instruction:
Error: immediate value out of range 0 to 31 at operand 3 -- `lsr w10,w10,#32'
Reduced test case:
--------------------------------------------------
$> more test.ll
; ModuleID = 'test.ll'
target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
target triple = "aarch64--linux-gnu"
%struct.element_t = type { i32 }
@list = internal constant [0 x %struct.element_t] zeroinitializer, align 4
define internal i32* @tink() {
entry:
%call = call i32 bitcast (i32 (...)* @foo to i32 ()*)()
%tobool = icmp ne i32 %call, 0
br i1 %tobool, label %lor.lhs.false, label %if.then
lor.lhs.false: ; preds = %entry
%mul = mul nsw i32 1, undef
%idx.ext = sext i32 %mul to i64
%add.ptr = getelementptr inbounds i8* undef, i64 %idx.ext
%call1 = call i32 bitcast (i32 (...)* @foo to i32 (i8*, i32)*)(i8* %add.ptr,
i32 undef)
%tobool2 = icmp ne i32 %call1, 0
br i1 %tobool2, label %lor.lhs.false3, label %if.then
lor.lhs.false3: ; preds = %lor.lhs.false
%mul4 = mul nsw i32 2, undef
%idx.ext5 = sext i32 %mul4 to i64
%add.ptr6 = getelementptr inbounds i8* undef, i64 %idx.ext5
%call7 = call i32 bitcast (i32 (...)* @foo to i32 (i8*, i32)*)(i8* %add.ptr6,
i32 undef)
%tobool8 = icmp ne i32 %call7, 0
br i1 %tobool8, label %if.end, label %if.then
if.then: ; preds = %lor.lhs.false3,
%lor.lhs.false, %entry
br label %if.end
if.end: ; preds = %if.then,
%lor.lhs.false3
ret i32* undef
}
declare i32 @foo(...)
--------------------------------------------------
Reproduce with:
$> llc -O0 test.ll -o - | grep lsr
lsr w10, w8, #32
The regression looks to have been introduced around 08/27-08/28.</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>