[LLVMbugs] [Bug 21470] New: Clang miscompiles fabs on x86_64-w64-windows-gnu
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Nov 3 14:34:53 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=21470
Bug ID: 21470
Summary: Clang miscompiles fabs on x86_64-w64-windows-gnu
Product: clang
Version: 3.5
Hardware: PC
OS: other
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: szabo.antal.92 at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 13283
--> http://llvm.org/bugs/attachment.cgi?id=13283&action=edit
Test case
Clang miscompiles fabs on windows x64 using -O1 or greater, if it's parameter
is passed by reference to another function. Instead of the correct value, it
always returns 0. I couldn't reproduce the bug by separately optimizing with
opt, but using "clang -O1 -mllvm -print-before-all -mllvm -print-after-all
bug.cpp" I found that the "Interprocedural Sparse Conditional Constant
Propagation" pass is probably the cause; it replaces the correct return value
in @fabs with an undef ( see https://gist.github.com/Sh4rK/4ec63273c387f9978799
). Test case attached.
Clang version:
Downloaded from the MSYS2 project with pacman, package
"mingw64/mingw-w64-x86_64-clang" version 3.5.0-5 ( MSYS2 installation
instructions: http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/ )
clang -v
clang version 3.5.0 (tags/RELEASE_350/final)
Target: x86_64-w64-windows-gnu
Thread model: posix
OS: Windows 8 x64
--
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/20141103/298a4896/attachment.html>
More information about the llvm-bugs
mailing list