[LLVMbugs] [Bug 18591] New: Incorrect optimization of is_simm32 C++ function from HotSpot JVM sources
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Jan 23 02:54:49 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=18591
Bug ID: 18591
Summary: Incorrect optimization of is_simm32 C++ function from
HotSpot JVM sources
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: mikael.gerdin at oracle.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 11924
--> http://llvm.org/bugs/attachment.cgi?id=11924&action=edit
test case
I tried to build the OpenJDK JVM with clang++ 3.4 and discovered that the 32
bit version seems to hit an impossible assert.
I did some digging and found out that the function Assembler::is_simm32 is
incorrectly optimized, causing us to always hit the assert.
The JVM sources in question are here:
http://hg.openjdk.java.net/jdk9/hs/hotspot/file/3e2b76368121/src/share/vm/asm/assembler.hpp
The bug appears on -O2 and above, both with clang-3.4 and with llvm+clang trunk
as of 2014-01-23.
I've created a reduced test case (attached)
llvm-build$ Release+Asserts/bin/clang++ -O1 -m32 ~/scratch/is_simm.cc; ./a.out;
echo "Exit code: $?"
is_simm32(1) = 1
min_simm(32) <= 1 && 1 <= max_simm(32) = 1
Exit code: 0
llvm-build$ Release+Asserts/bin/clang++ -O2 -m32 ~/scratch/is_simm.cc; ./a.out;
echo "Exit code: $?"
is_simm32(1) = 0
min_simm(32) <= 1 && 1 <= max_simm(32) = 1
Exit code: 1
--
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/20140123/b26aa5ba/attachment.html>
More information about the llvm-bugs
mailing list