[llvm-bugs] [Bug 32505] New: llvm-stress crashes DAG.getLoad()
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Apr 3 08:57:13 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=32505
Bug ID: 32505
Summary: llvm-stress crashes DAG.getLoad()
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: paulsson at linux.vnet.ibm.com
CC: llvm-bugs at lists.llvm.org
Created attachment 18213
--> https://bugs.llvm.org/attachment.cgi?id=18213&action=edit
reduced test case
A small nonsense function looks like:
Optimized type-legalized selection DAG: BB#0 'autogen_SD5046:CF265'
SelectionDAG has 9 nodes:
t0: ch = EntryToken
t27: i32,ch = load<LD1[undef+1], sext from i8> t0, undef:i64, undef:i64
t22: f32 = bitcast t27
t11: ch = CopyToReg t0, Register:f32 %vreg0, t22
t13: ch = CopyToReg t0, Register:f32 %vreg1, t22
t14: ch = TokenFactor t11, t13
SystemZTargetLowering::lowerBITCAST() calls DAG.getLoad() in the first if
statement.
This causes an assert to trigger:
assert(memvt.getStoreSize() <= MMO->getSize() && "Size mismatch!");
The problem here is that memvt.getStoreSize()==4, while MMO->getSize()==1.
The load which has the 'sext from i8' flag, while it is only loading one byte.
How should this be handled? Should the load be expanded into load+sext somehow
in the SystemZ method instead of calling getLoad() directly?
Run with
llc -mtriple=s390x-linux-gnu -mcpu=zEC12 ./stress_fail_bitcast_load.ll
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170403/34270df4/attachment-0001.html>
More information about the llvm-bugs
mailing list