From bugzilla-daemon at llvm.org Wed Jun 1 02:31:08 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Wed, 1 Jun 2011 02:31:08 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10058] New: C standard incompatibility concerning
untyped functions (and varargs)
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10058
Summary: C standard incompatibility concerning untyped
functions (and varargs)
Product: clang
Version: 2.8
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: hranac.bz at email.cz
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=6668)
--> (http://llvm.org/bugs/attachment.cgi?id=6668)
The C source file.
Pre-standard function definitions (with untyped parameters - e.g. "foo(a,b)
{...}") are processed in a wrong and inconsistent way.
Translate the attached C file with the following command:
clang example.c -emit-llvm -S
When you look at the resulting ll file (in the second attachment), you will see
that the definitions of the functions f1-f6 are all right and as expected
(everything defaults to integer). However, they are used (in the function main)
as if they were variadic. This behaviour is in contradiction with C standard
(functions are variadic only if explicitly declared and/or defined as such).
This (probably) happens during the LLVM IR generation (hence the component
"LLVM Codegen" was set instead of "Frontend").
Note: I understand that this is probably a "feature".
Also, it is easy for a backend to deal with this. However, let's say that you
are using clang for something else (let's say, semantics extraction) and you
need a correct result.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Wed Jun 1 02:45:56 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Wed, 1 Jun 2011 02:45:56 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10057] leftover temporaries in function
In-Reply-To:
References:
Message-ID: <20110601074556.CC43E2A6C12C@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10057
Nick Lewycky changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Nick Lewycky 2011-06-01 02:45:56 CDT ---
Fixed in r132390.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Wed Jun 1 08:02:24 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Wed, 1 Jun 2011 08:02:24 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10059] New: UNREACHABLE executed at
X86InstrInfo.cpp:2020
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10059
Summary: UNREACHABLE executed at X86InstrInfo.cpp:2020
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
AssignedTo: unassignedbugs at nondot.org
ReportedBy: hans at chromium.org
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=6670)
--> (http://llvm.org/bugs/attachment.cgi?id=6670)
reduced test case
Trying to compile the attached program with "clang++ -c -O2 fail.ii" on Linux
causes the stack trace below.
It seems this started with LLVM r132358. This breaks the Chromium build.
Unknown regclass
UNREACHABLE executed at X86InstrInfo.cpp:2020!
0 clang 0x000000000190533f
1 clang 0x00000000019075b2
2 libpthread.so.0 0x00007f71281c38f0
3 libc.so.6 0x00007f71274b2a75 gsignal + 53
4 libc.so.6 0x00007f71274b65c0 abort + 384
5 clang 0x00000000018efc92 llvm::llvm_unreachable_internal(char
const*, char const*, unsigned int) + 354
6 clang 0x0000000001248227
7 clang 0x000000000124b047
llvm::X86InstrInfo::storeRegToStackSlot(llvm::MachineBasicBlock&,
llvm::ilist_iterator, unsigned int, bool, int,
llvm::TargetRegisterClass const*, llvm::TargetRegisterInfo const*) const + 151
8 clang 0x000000000154fec0
9 clang 0x0000000001550721
10 clang 0x0000000001554352
11 clang 0x00000000014a39de
12 clang 0x000000000159cf22 llvm::RegAllocBase::allocatePhysRegs() +
594
13 clang 0x000000000149b554
14 clang 0x000000000184ef0b
llvm::FPPassManager::runOnFunction(llvm::Function&) + 587
15 clang 0x000000000184f00b
llvm::FPPassManager::runOnModule(llvm::Module&) + 75
16 clang 0x00000000018505e7
llvm::MPPassManager::runOnModule(llvm::Module&) + 503
17 clang 0x000000000185077b llvm::PassManagerImpl::run(llvm::Module&)
+ 187
18 clang 0x00000000007c1f3f
clang::EmitBackendOutput(clang::Diagnostic&, clang::CodeGenOptions const&,
clang::TargetOptions const&, llvm::Module*, clang::BackendAction,
llvm::raw_ostream*) + 1807
19 clang 0x00000000007bf51b
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 251
20 clang 0x00000000008f17ed clang::ParseAST(clang::Sema&, bool) + 413
21 clang 0x00000000007be7e4 clang::CodeGenAction::ExecuteAction() +
68
22 clang 0x00000000006a7233
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 371
23 clang 0x00000000006816c4
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1268
24 clang 0x0000000000677d48 cc1_main(char const**, char const**, char
const*, void*) + 760
25 clang 0x0000000000680580 main + 7040
26 libc.so.6 0x00007f712749dc4d __libc_start_main + 253
27 clang 0x0000000000676179
Stack dump:
0. Program arguments: /usr/local/google/work/llvm/Release+Asserts/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
fail.ii -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.20.1 -momit-leaf-frame-pointer -coverage-file fail.o -resource-dir
/usr/local/google/work/llvm/Release+Asserts/bin/../lib/clang/3.0 -O2
-fdeprecated-macro -ferror-limit 19 -fmessage-length 102 -fcxx-exceptions
-fexceptions -fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o
fail.o -x c++-cpp-output fail.ii
1. parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'fail.ii'.
4. Running pass 'Greedy Register Allocator' on function
'@_Z18softlight_modeprocjj'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal 2 (use -v to see
invocation)
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Wed Jun 1 09:01:23 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Wed, 1 Jun 2011 09:01:23 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10060] New: Overloaded operator new[] gets a wrong
argument value
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10060
Summary: Overloaded operator new[] gets a wrong argument value
Product: clang
Version: 2.9
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: mikhail.kalugin at gmail.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
== Steps to reproduce (you can find the complete source code in the
attachment.):
1. Overload operator new[]:
inline void * operator new[] (std::size_t size) throw(std::bad_alloc) {
printf("new[] was called with size = %lu\n", size);
return NULL;
}
2. Allocate an array, where array size is a variable:
std::size_t cnt = 7;
int * a = new int[cnt];
== Expected behavior:
"new[] was called with size = 28" is printed
== Actual behavior:
"new[] was called with size = 4294967295" is printed. With real new[]
implementation this causes a crash. What's interesting: if we use a constant as
the size of array, it works fine.
== Environment:
Apple's build of clang from XCode 4.0.2 is used. Here's "clang++ --version"'s
output:
Apple clang version 2.0 (tags/Apple/clang-139) (based on LLVM 2.9svn)
Target: x86_64-apple-darwin10
Thread model: posix
The bug appears only on armv6 target architecture ? I'm executing the app on
iPhone 2G with iOS 3.1.3. Everything is fine on armv7 devices.
Here's the command line used by XCode:
/Xcode4/Platforms/iPhoneOS.platform/Developer/usr/bin/clang -x c++ -arch armv6
-fmessage-length=0 -fdiagnostics-print-source-range-info
-fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -Wno-trigraphs
-fpascal-strings -O0 -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter
-Wunused-variable -Wunused-value -DDEBUG -isysroot
/Xcode4/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk -gdwarf-2
-fvisibility-inlines-hidden -mthumb -miphoneos-version-min=3.0 -iquote
/Users/fourdman/Library/Developer/Xcode/DerivedData/newop-ccwnmiceftmdgfeedfcpbcaktxjp/Build/Intermediates/newop.build/Debug-iphoneos/newop.build/newop-generated-files.hmap
-I/Users/fourdman/Library/Developer/Xcode/DerivedData/newop-ccwnmiceftmdgfeedfcpbcaktxjp/Build/Intermediates/newop.build/Debug-iphoneos/newop.build/newop-own-target-headers.hmap
-I/Users/fourdman/Library/Developer/Xcode/DerivedData/newop-ccwnmiceftmdgfeedfcpbcaktxjp/Build/Intermediates/newop.build/Debug-iphoneos/newop.build/newop-all-target-headers.hmap
-iquote
/Users/fourdman/Library/Developer/Xcode/DerivedData/newop-ccwnmiceftmdgfeedfcpbcaktxjp/Build/Intermediates/newop.build/Debug-iphoneos/newop.build/newop-project-headers.hmap
-I/Users/fourdman/Library/Developer/Xcode/DerivedData/newop-ccwnmiceftmdgfeedfcpbcaktxjp/Build/Products/Debug-iphoneos/include
-I/Users/fourdman/Library/Developer/Xcode/DerivedData/newop-ccwnmiceftmdgfeedfcpbcaktxjp/Build/Intermediates/newop.build/Debug-iphoneos/newop.build/DerivedSources/armv6
-I/Users/fourdman/Library/Developer/Xcode/DerivedData/newop-ccwnmiceftmdgfeedfcpbcaktxjp/Build/Intermediates/newop.build/Debug-iphoneos/newop.build/DerivedSources
-F/Users/fourdman/Library/Developer/Xcode/DerivedData/newop-ccwnmiceftmdgfeedfcpbcaktxjp/Build/Products/Debug-iphoneos
-c /Users/fourdman/Documents/Projects/Yandex/newop/newop/main.cpp -o
/Users/fourdman/Library/Developer/Xcode/DerivedData/newop-ccwnmiceftmdgfeedfcpbcaktxjp/Build/Intermediates/newop.build/Debug-iphoneos/newop.build/Objects-normal/armv6/main.o
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Wed Jun 1 09:31:28 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Wed, 1 Jun 2011 09:31:28 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10061] New: chain-empty-initial-namespace fails
unit testing
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10061
Summary: chain-empty-initial-namespace fails unit testing
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: apacherulzz at yahoo.com
CC: llvmbugs at cs.uiuc.edu
Yesterday morning I built everything from over the weekend and all tests passed
(except hello.c, filled a separate bug for that). This morning I checked out
trunk and built. When running unit testing chain-empty-initial-namespace fails.
llvm[0]: Running test suite
make[1]: Entering directory `/opt/llvm/build/test'
Making a new site.exp file...
Making LLVM unittest 'lit.site.cfg' file...
make -C /opt/llvm/build/test/../tools/clang/test lit.site.cfg Unit/lit.site.cfg
make[2]: Entering directory `/opt/llvm/build/tools/clang/test'
Making Clang 'lit.site.cfg' file...
Making Clang 'Unit/lit.site.cfg' file...
Making LLVM 'lit.site.cfg' file...
make[2]: Leaving directory `/opt/llvm/build/tools/clang/test'
( ulimit -t 600 ; ulimit -d 512000 ; ulimit -m 512000 ; ulimit -v 1024000 ; \
/opt/llvm/llvm/utils/lit/lit.py -s -v .
/opt/llvm/build/test/../tools/clang/test )
lit.py: lit.cfg:143: note: using clang:
'/opt/llvm/build/Release+Asserts/bin/clang'
FAIL: Clang :: Driver/hello.c (1387 of 9215)
******************** TEST 'Clang :: Driver/hello.c' FAILED ********************
Script:
--
/opt/llvm/build/Release+Asserts/bin/clang -ccc-echo -o
/opt/llvm/build/tools/clang/test/Driver/Output/hello.c.tmp.exe
/opt/llvm/llvm/tools/clang/test/Driver/hello.c 2>
/opt/llvm/build/tools/clang/test/Driver/Output/hello.c.tmp.log
grep 'clang\(-[0-9.]\+\)\?\(\.[Ee][Xx][Ee]\)\?" -cc1 .*hello.c'
/opt/llvm/build/tools/clang/test/Driver/Output/hello.c.tmp.log
/opt/llvm/build/tools/clang/test/Driver/Output/hello.c.tmp.exe >
/opt/llvm/build/tools/clang/test/Driver/Output/hello.c.tmp.out
grep "I'm a little driver, short and stout."
/opt/llvm/build/tools/clang/test/Driver/Output/hello.c.tmp.out
--
Exit Code: 1
********************
FAIL: Clang :: PCH/chain-empty-initial-namespace.cpp (1612 of 9215)
******************** TEST 'Clang :: PCH/chain-empty-initial-namespace.cpp'
FAILED ********************
Script:
--
/opt/llvm/build/Release+Asserts/bin/clang -cc1 -include
/opt/llvm/llvm/tools/clang/test/PCH/chain-empty-initial-namespace.cpp -include
/opt/llvm/llvm/tools/clang/test/PCH/chain-empty-initial-namespace.cpp
-fsyntax-only
/opt/llvm/llvm/tools/clang/test/PCH/chain-empty-initial-namespace.cpp
/opt/llvm/build/Release+Asserts/bin/clang -cc1 -chain-include
/opt/llvm/llvm/tools/clang/test/PCH/chain-empty-initial-namespace.cpp
-chain-include
/opt/llvm/llvm/tools/clang/test/PCH/chain-empty-initial-namespace.cpp
-fsyntax-only
/opt/llvm/llvm/tools/clang/test/PCH/chain-empty-initial-namespace.cpp
--
Exit Code: 134
Command Output (stderr):
--
clang: /opt/llvm/llvm/lib/Support/raw_ostream.cpp:323: void
llvm::raw_ostream::copy_to_buffer(const char*, size_t): Assertion `Size <=
size_t(OutBufEnd - OutBufCur) && "Buffer overrun!"' failed.
0 clang 0x09651fb8
Stack dump:
0. Program arguments: /opt/llvm/build/Release+Asserts/bin/clang -cc1
-chain-include
/opt/llvm/llvm/tools/clang/test/PCH/chain-empty-initial-namespace.cpp
-chain-include
/opt/llvm/llvm/tools/clang/test/PCH/chain-empty-initial-namespace.cpp
-fsyntax-only
/opt/llvm/llvm/tools/clang/test/PCH/chain-empty-initial-namespace.cpp
1. parser at end of file
/opt/llvm/build/tools/clang/test/PCH/Output/chain-empty-initial-namespace.cpp.script:
line 2: 9099 Aborted /opt/llvm/build/Release+Asserts/bin/clang
-cc1 -chain-include
/opt/llvm/llvm/tools/clang/test/PCH/chain-empty-initial-namespace.cpp
-chain-include
/opt/llvm/llvm/tools/clang/test/PCH/chain-empty-initial-namespace.cpp
-fsyntax-only
/opt/llvm/llvm/tools/clang/test/PCH/chain-empty-initial-namespace.cpp
--
********************
Testing Time: 189.84s
********************
Failing Tests (2):
Clang :: Driver/hello.c
Clang :: PCH/chain-empty-initial-namespace.cpp
Expected Passes : 8597
Expected Failures : 67
Unsupported Tests : 549
Unexpected Failures: 2
make[1]: *** [check-local-all] Error 1
make[1]: Leaving directory `/opt/llvm/build/test'
make: *** [check-all] Error 2
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Wed Jun 1 10:15:38 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Wed, 1 Jun 2011 10:15:38 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10052] Comparision of pointer to Objective-C object
with C++0x nullptr fails to compile
In-Reply-To:
References:
Message-ID: <20110601151538.289CB2A6C124@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10052
Douglas Gregor changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Douglas Gregor 2011-06-01 10:15:37 CDT ---
Fixed in Clang r132397.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Wed Jun 1 10:50:56 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Wed, 1 Jun 2011 10:50:56 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10059] UNREACHABLE executed at X86InstrInfo.cpp:2020
In-Reply-To:
References:
Message-ID: <20110601155056.9231C2A6C12C@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10059
Jakob Stoklund Olesen changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Wed Jun 1 11:05:22 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Wed, 1 Jun 2011 11:05:22 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10043] Failure to warn about inaccessible copy
constructor of member of class in -Wbind-to-temporary-copy
In-Reply-To:
References:
Message-ID: <20110601160522.5467C2A6C12C@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10043
Douglas Gregor changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #1 from Douglas Gregor 2011-06-01 11:05:21 CDT ---
g(Y()) doesn't warn in C++98 mode, and never did, because implicitly-declared
copy constructors are always public. We would only detect a problem if we went
ahead and caused the copy constructor to be implicitly defined, but at that
point it's going to be fairly tricky to avoid getting a hard error later on
down the line.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Wed Jun 1 11:15:50 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Wed, 1 Jun 2011 11:15:50 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10060] Calling new[] with a variable size causes a
crash (was: overloaded operator new[] gets a wrong argument value)
In-Reply-To:
References:
Message-ID: <20110601161550.E8A5F2A6C12D@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10060
Eric Christopher changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |echristo at gmail.com
Resolution| |FIXED
--- Comment #3 from Eric Christopher 2011-06-01 11:15:50 CDT ---
I fixed this a while ago in ToT and it should make its way into Xcode soon (if
it isn't there already):
/Volumes/Data/builds/build-llvm/Debug+Asserts/bin/clang++ -arch armv6 -O0
-mthumb main.cpp -isysroot
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk
-miphoneos-version-min=4.2
new[] was called with size = 28
a = 0x0
new[] was called with size = 28
b = 0x0
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Wed Jun 1 16:31:51 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Wed, 1 Jun 2011 16:31:51 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10058] C standard incompatibility concerning
untyped functions (and varargs)
In-Reply-To:
References:
Message-ID: <20110601213151.DC7A02A6C12D@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10058
Eli Friedman changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |sharparrow1 at yahoo.com
Resolution| |INVALID
--- Comment #2 from Eli Friedman 2011-06-01 16:31:51 CDT ---
Yes, it's a "feature"; we do it for the sake of compatibility. And it isn't
incompatible with the C standard in that the C standard doesn't directly say
anything about how LLVM IR represents function calls.
If you need help using the LLVM APIs to detect cases like this (it isn't too
hard), please email llvmdev.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Wed Jun 1 17:38:06 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Wed, 1 Jun 2011 17:38:06 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10062] New: llvm doesn't merge masked loads
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10062
Summary: llvm doesn't merge masked loads
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Scalar Optimizations
AssignedTo: unassignedbugs at nondot.org
ReportedBy: nlewycky at google.com
CC: llvmbugs at cs.uiuc.edu, scshunt at csclub.uwaterloo.ca
This is related to bug 5039 but is specifically concerned with cases where LLVM
should be able to merge the loads/tests across multiple fields. A patch in
development would put this sort of optimizable logic in clang's hot path, so we
took a look at what sort of code LLVM would generate for it. Testcase:
struct Foo {
unsigned char foo : 5;
unsigned char bar : 3;
};
int test1(struct Foo foo) {
// should be a single comparison
return foo.foo == 3 && foo.bar == 3;
}
int test2(struct Foo foo) {
// should be a single comparison
return foo.foo != 0 || foo.bar != 0;
}
int test3(struct Foo foo) {
// should be a single cast
return foo.bar + (foo.foo << 3);
}
test1 has an entire branch which looks like the same problem as bug 10054.
test2 and test3 are straight-line code with no optimization opportunities taken
advantage of.
For reference, GCC 4.6 produces:
test1:
xorl %eax, %eax
cmpb $99, %dil
sete %al
ret
test2:
xorl %eax, %eax
testb %dil, %dil
setne %al
ret
test3:
movl %edi, %eax
andl $31, %edi
shrb $5, %al
movzbl %al, %eax
leal (%rax,%rdi,8), %eax
ret
with a missed optimization in test3.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Wed Jun 1 18:03:49 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Wed, 1 Jun 2011 18:03:49 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10063] New: Problems with 'switch' and destructors
in control flow graph
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10063
Summary: Problems with 'switch' and destructors in control flow
graph
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: matthewbg at google.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Created an attachment (id=6673)
--> (http://llvm.org/bugs/attachment.cgi?id=6673)
test cases
The attached file has a number of testcases which should not trigger
-Wreturn-type. In all cases, control enters a switch statement with no cases
but 'default', and the default case instantiates an object with a noreturn
destructor. We get it right in a few cases, but not all:
$ clang -fsyntax-only -Wreturn-type ~/testcases/noreturn_dtor_switch.cc
/home/matthewbg/testcases/noreturn_dtor_switch.cc:24:1: warning: control
reaches end of non-void function [-Wreturn-type]
} // 2
^
/home/matthewbg/testcases/noreturn_dtor_switch.cc:46:1: warning: control
reaches end of non-void function [-Wreturn-type]
} // 5
^
/home/matthewbg/testcases/noreturn_dtor_switch.cc:54:1: warning: control
reaches end of non-void function [-Wreturn-type]
} // 6
^
/home/matthewbg/testcases/noreturn_dtor_switch.cc:62:1: warning: control
reaches end of non-void function [-Wreturn-type]
} // 7
^
/home/matthewbg/testcases/noreturn_dtor_switch.cc:70:1: warning: control
reaches end of non-void function [-Wreturn-type]
} // 8
^
5 warnings generated.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Thu Jun 2 05:58:48 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Thu, 2 Jun 2011 05:58:48 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10064] New: Clang doesn't know about Debian
wheezy/sid
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10064
Summary: Clang doesn't know about Debian wheezy/sid
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Driver
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: themiwi at users.sourceforge.net
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=6674)
--> (http://llvm.org/bugs/attachment.cgi?id=6674)
Patch adding Debian wheezy/sid handling
In lib/Driver/ToolChains.cpp the enum and detection for Debian wheezy/sid is
missing.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Thu Jun 2 09:23:49 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Thu, 2 Jun 2011 09:23:49 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10065] New: Bogus pedantic warning when using
offsetof(type, field[n])
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10065
Summary: Bogus pedantic warning when using offsetof(type,
field[n])
Product: clang
Version: 2.9
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: Frontend
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: rb at ravenbrook.com
CC: llvmbugs at cs.uiuc.edu
If you use an expression like
offsetof(struct hello_s, stuff[99])
when compiling with -ansi -pedantic, you get a warning "using extended field
designator is an extension". The C89 standard says:
"The member-designator shall be such that given
static type t;
then the expression &(t. member-designator ) evaluates to an address
constant."
I can't find anything which says this is any kind of extension. And, for what
it's worth, gcc's pedantic mode doesn't complain.
Test code attached.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Thu Jun 2 09:32:39 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Thu, 2 Jun 2011 09:32:39 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10061] chain-empty-initial-namespace fails unit
testing
In-Reply-To:
References:
Message-ID: <20110602143239.9B4CA2A6C124@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10061
apacherulzz at yahoo.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from apacherulzz at yahoo.com 2011-06-02 09:32:39 CDT ---
Just updated trunk this morning, recompiled and made check-all. The error
message has gone away so I believe the bug to be fixed. Closing this out.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Thu Jun 2 10:33:56 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Thu, 2 Jun 2011 10:33:56 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10066] New: Greedy allocator fails to fold a memory
operand when spilling
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10066
Summary: Greedy allocator fails to fold a memory operand when
spilling
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Register Allocator
AssignedTo: unassignedbugs at nondot.org
ReportedBy: sergey.galanov at intel.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=6676)
--> (http://llvm.org/bugs/attachment.cgi?id=6676)
LLVM IR source
Hi.
The code produced for the test in attachment is worse with the greedy allocator
than it was with the linear scan allocator (note that the test is compiled with
-disable-fp-elim option).
The test is a pair of nested loops. The outer loop counter (in vreg17) is
spilled on x86 but despite being used only once (for decrementing) stack slot
is not folded into the instruction. This happens because vreg17 is first split
into two registers (vreg54 and vreg53). Physical register is allocated for the
first one and the second one is spilled, so at that point it is not possible to
fold the memory operand unless it is somehow known that the two registers
originated from a common one.
Seems that greedy allocator is too greedy at splitting the intervals :) This
might not be a problem for a RISC architecture but it is not very good for
CISC.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Thu Jun 2 11:14:08 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Thu, 2 Jun 2011 11:14:08 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10041] add support for -fgnu89-inline
In-Reply-To:
References:
Message-ID: <20110602161408.C1AE52A6C12E@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10041
Rafael ?vila de Esp?ndola changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #2 from Rafael ?vila de Esp?ndola 2011-06-02 11:14:08 CDT ---
Fixed in 132460
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Thu Jun 2 11:40:59 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Thu, 2 Jun 2011 11:40:59 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10067] New: clang miscompiles MipsISelLowering.cpp
on i386-linux.
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10067
Summary: clang miscompiles MipsISelLowering.cpp on i386-linux.
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Scalar Optimizations
AssignedTo: unassignedbugs at nondot.org
ReportedBy: benny.kra at gmail.com
CC: llvmbugs at cs.uiuc.edu
See
http://google1.osuosl.org:8011/builders/clang-i686-linux-selfhost-rel/builds/18
Attached is a standalone c++ test case that shows the problem. It's not visible
on darwin or x86_64-linux though.
$ clang++ v.cc && ./a.out
DEADBEEF
$ clang++ -O1 v.cc && ./a.out
0
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Thu Jun 2 14:08:49 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Thu, 2 Jun 2011 14:08:49 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10068] New: Assertion `Num < NumOperands &&
"Invalid child # of SDNode!"
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10068
Summary: Assertion `Num < NumOperands && "Invalid child # of
SDNode!"
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
AssignedTo: unassignedbugs at nondot.org
ReportedBy: rafael.espindola at gmail.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=6684)
--> (http://llvm.org/bugs/attachment.cgi?id=6684)
test.ll
/home/espindola/tmpfs/build/bin/llc test.ll
llc: /home/espindola/llvm/llvm/include/llvm/CodeGen/SelectionDAGNodes.h:514:
const llvm::SDValue &llvm::SDNode::getOperand(unsigned int) const: Assertion
`Num < NumOperands && "Invalid child # of SDNode!"' failed.
Stack dump:
0. Program arguments: /home/espindola/tmpfs/build/bin/llc test.ll
1. Running pass 'Function Pass Manager' on module 'test.ll'.
2. Running pass 'X86 DAG->DAG Instruction Selection' on function '@foobar'
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Thu Jun 2 15:03:33 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Thu, 2 Jun 2011 15:03:33 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10065] Bogus pedantic warning when using
offsetof(type, field[n])
In-Reply-To:
References:
Message-ID: <20110602200333.673B62A6C124@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10065
Eli Friedman changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #2 from Eli Friedman 2011-06-02 15:03:32 CDT ---
"[...] expands to an integer constant expression that has type size_t, the
value of which is the offset in bytes, to the structure member (designated by
member-designator), from the beginning of its structure (designated by type)."
"stuff[99]" is not a "structure member"; it's part of an expression indexing
into a struct.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Thu Jun 2 15:03:37 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Thu, 2 Jun 2011 15:03:37 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10068] Assertion `Num < NumOperands && "Invalid
child # of SDNode!"
In-Reply-To:
References:
Message-ID: <20110602200337.24B152A6C132@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10068
Rafael ?vila de Esp?ndola changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #3 from Rafael ?vila de Esp?ndola 2011-06-02 15:03:36 CDT ---
Fixed by reverting 132424.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Thu Jun 2 15:14:38 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Thu, 2 Jun 2011 15:14:38 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10069] New: Clang incorrectly reports substitution
failure with default template arguments in function template
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10069
Summary: Clang incorrectly reports substitution failure with
default template arguments in function template
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Keywords: compile-fail
Severity: normal
Priority: P
Component: C++0x
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: jbytheway+llvm at gmail.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
This is a case reduced from code in libstdc++ (as shipped with gcc 4.5.2).
The following code, which I believe is valid:
template
T f(T x)
{
return x;
}
int main()
{
f(0);
return 0;
}
generates the following error when given to clang++ -std=gnu++0x:
template-int.cpp:9:3: error: no matching function for call to 'f'
f(0);
^~~~~~~~~~~~~~~~~~
template-int.cpp:2:3: note: candidate template ignored: substitution failure
[with T = unsigned int, a = 0, b = 0]
T f(T x)
^
1 error generated.
gcc 4.5.2 accepts this code. Note that if you replace 'unsigned int' by just
'int' then it compiles fine. Also, if the fourth template argument of f is
removed, then it compiles fine.
$ clang++ --version
clang version 3.0 (trunk 132479)
Target: x86_64-unknown-linux-gnu
Thread model: posix
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Thu Jun 2 16:25:34 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Thu, 2 Jun 2011 16:25:34 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10067] clang miscompiles MipsISelLowering.cpp on
i386-linux.
In-Reply-To:
References:
Message-ID: <20110602212534.0768B2A6C124@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10067
Eli Friedman changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |sharparrow1 at yahoo.com
Resolution| |FIXED
--- Comment #5 from Eli Friedman 2011-06-02 16:25:33 CDT ---
r132485.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Thu Jun 2 16:37:23 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Thu, 2 Jun 2011 16:37:23 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10064] Clang doesn't know about Debian wheezy/sid
In-Reply-To:
References:
Message-ID: <20110602213723.7B8F52A6C124@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10064
Eli Friedman changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |sharparrow1 at yahoo.com
Resolution| |FIXED
--- Comment #2 from Eli Friedman 2011-06-02 16:37:23 CDT ---
r132489.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Thu Jun 2 19:50:22 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Thu, 2 Jun 2011 19:50:22 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10056] PassManager segfault when trying to schedule
custom Immutable Pass
In-Reply-To:
References:
Message-ID: <20110603005022.E83552A6C124@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10056
Andrew Trick changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
AssignedTo|unassignedbugs at nondot.org |atrick at apple.com
--- Comment #3 from Andrew Trick 2011-06-02 19:50:22 CDT ---
Basic assertions should do the trick. Fixed in r132520.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Thu Jun 2 22:00:15 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Thu, 2 Jun 2011 22:00:15 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10069] Clang incorrectly reports substitution
failure with default template arguments in function template
In-Reply-To:
References:
Message-ID: <20110603030015.BB11E2A6C124@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10069
Douglas Gregor changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Douglas Gregor 2011-06-02 22:00:15 CDT ---
Fixed in Clang r132529.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Thu Jun 2 22:02:26 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Thu, 2 Jun 2011 22:02:26 -0500 (CDT)
Subject: [LLVMbugs] [Bug 8650] no implicit conversion in template values
In-Reply-To:
References:
Message-ID: <20110603030226.F01122A6C12E@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=8650
Douglas Gregor changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Douglas Gregor 2011-06-02 22:02:26 CDT ---
This is fixed in top-of-tree Clang.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Thu Jun 2 22:35:45 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Thu, 2 Jun 2011 22:35:45 -0500 (CDT)
Subject: [LLVMbugs] [Bug 7985] clang ignores candidate template
In-Reply-To:
References:
Message-ID: <20110603033545.9C8142A6C12E@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=7985
Douglas Gregor changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
--- Comment #6 from Douglas Gregor 2011-06-02 22:35:44 CDT ---
Fixed in Clang r132530.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Thu Jun 2 23:19:13 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Thu, 2 Jun 2011 23:19:13 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10070] New: Needless sse spill/reload
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10070
Summary: Needless sse spill/reload
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Register Allocator
AssignedTo: unassignedbugs at nondot.org
ReportedBy: jmuizelaar at mozilla.com
CC: llvmbugs at cs.uiuc.edu
The following code:
#include
class gfxRect {
double x;
double y;
double width;
double height;
void RoundOut();
};
void gfxRect::RoundOut() {
double x0 = floor(x);
double y0 = floor(y);
double x1 = ceil(x+width);
double y1 = ceil(y+height);
x = x0;
y = y0;
width = x1 - x0;
height = y1 - y0;
}
compiles to the following with a needless spill/reload at the end:
movq %rdi, %rbx
movsd (%rbx), %xmm0
callq _floor
movsd %xmm0, -32(%rbp) ## 8-byte Spill
movsd 8(%rbx), %xmm0
callq _floor
movsd %xmm0, -24(%rbp) ## 8-byte Spill
movsd (%rbx), %xmm0
addsd 16(%rbx), %xmm0
callq _ceil
movsd %xmm0, -16(%rbp) ## 8-byte Spill
movsd 8(%rbx), %xmm0
addsd 24(%rbx), %xmm0
callq _ceil
movsd -32(%rbp), %xmm3 ## 8-byte Reload
movsd %xmm3, (%rbx)
movsd -24(%rbp), %xmm2 ## 8-byte Reload
movsd %xmm2, 8(%rbx)
movsd -16(%rbp), %xmm1 ## 8-byte Reload
subsd %xmm3, %xmm1
movsd %xmm1, -16(%rbp) ## 8-byte Spill
movsd -16(%rbp), %xmm1 ## 8-byte Reload
here ----^
movsd %xmm1, 16(%rbx)
subsd %xmm2, %xmm0
movsd %xmm0, 24(%rbx)
addq $24, %rsp
popq %rbx
popq %rbp
ret
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Fri Jun 3 00:24:22 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Fri, 3 Jun 2011 00:24:22 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10071] New: Assertion in codegen
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10071
Summary: Assertion in codegen
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: asl at math.spbu.ru
CC: llvmbugs at cs.uiuc.edu
Consider the following testcase:
struct Foo {
union {
struct {
unsigned char padding1[3];
struct { } bar;
};
};
Foo() { }
};
struct __attribute__((__aligned__((16)))) Bar {
Foo m_subData;
};
Bar __attribute__((__aligned__((128)))) Baz[50];
We're having:
clang++ testcase.cpp
Assertion failed: (Ty && "Invalid GetElementPtrInst indices for type!"),
function checkType, file
/Users/asl/Projects/llvm/src/include/llvm/Instructions.h, line 278.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Fri Jun 3 00:41:18 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Fri, 3 Jun 2011 00:41:18 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10072] New: Necessary 'indirectbr' instruction is
optimized away
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10072
Summary: Necessary 'indirectbr' instruction is optimized away
Product: libraries
Version: trunk
Platform: PC
OS/Version: FreeBSD
Status: NEW
Severity: release blocker
Priority: P
Component: Loop Optimizer
AssignedTo: unassignedbugs at nondot.org
ReportedBy: yuri at tsoft.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=6686)
--> (http://llvm.org/bugs/attachment.cgi?id=6686)
testcase
Please run the attached testcase (shar shell archive) with the current trunk
version of llvm.
It will create the original module mod.ll. It will also optimize it into
mod-o.ll.
indirectbr instruction in question is missing from mod-o.ll.
This instruction is necessary because it depends on the return value of
undefined function xselectorx().
As a result mod-o.ll is wrong (not equivalent to mod.ll).
I observe the problem with the today's revision 132525 and with the older
revision 128446. I know this didn't happen with the code from few months ago.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Fri Jun 3 01:27:33 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Fri, 3 Jun 2011 01:27:33 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10031] crash when building with -O3
In-Reply-To:
References:
Message-ID: <20110603062733.E15522A6C130@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10031
Nick Lewycky changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #4 from Nick Lewycky 2011-06-03 01:27:32 CDT ---
Fixed in r132535. Thanks for the bug report!
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Fri Jun 3 04:23:17 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Fri, 3 Jun 2011 04:23:17 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10073] New: "Cannot select" for bitcasts of AVX
data types
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10073
Summary: "Cannot select" for bitcasts of AVX data types
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
AssignedTo: unassignedbugs at nondot.org
ReportedBy: karrenberg at cs.uni-saarland.de
CC: llvmbugs at cs.uiuc.edu
The AVX backend gets confused about mask code as e.g. produced by VCMPPS
together with mask operations and corresponding bitcasts.
Masks that are represented as <8 x i32> should be able to be modified by
xor/and/or which should get lowered to VXORPS/VANDPS/VORPS.
It could also make sense to allow these to operate on <8 x float>, matching the
C intrinsics of immintrin.h (_mm256_cmpgt_ps etc. produce __m256 instead of
__m256i, _mm256_xor_ps takes __m256 operators as well) and LLVM's own
intrinsics (llvm.x86.avx.cmp.ps.256 produces <8 x float>,
llvm.x86.avx.blendv.ps.256 takes an <8 x float> operand as condition).
Currently, code generation for most of these operations fails with "Cannot
select" messages for a cast operation, which could mean that LLVM is only
confused about the required types, not about the bit operations.
Consider these examples:
define <8 x float> @test1(<8 x float> %a, <8 x float> %b, <8 x i32> %m)
nounwind readnone {
entry:
%cmp = tail call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a,
<8 x float> %b, i8 1) nounwind readnone
%res = tail call <8 x float> @llvm.x86.avx.blendv.ps.256(<8 x float>
%a, <8 x float> %b, <8 x float> %cmp) nounwind readnone
ret <8 x float> %res
}
This works fine and "llc -filetype=asm -mattr=avx" produces the expected
assembly (VCMPLTPS + VBLENDVPS).
On the other hand, this does not work:
define <8 x float> @test2(<8 x float> %a, <8 x float> %b, <8 x i32> %m)
nounwind readnone {
entry:
%cmp = tail call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a,
<8 x float> %b, i8 1) nounwind readnone
%cast = bitcast <8 x float> %cmp to <8 x i32>
%mask = and <8 x i32> %cast, %m
%blend_cond = bitcast <8 x i32> %mask to <8 x float>
%res = tail call <8 x float> @llvm.x86.avx.blendv.ps.256(<8 x float>
%a, <8 x float> %b, <8 x float> %blend_cond) nounwind readnone
ret <8 x float> %res
}
This should produce VCMPLTPS, VANDPS, BLENDVPS, while llc (2.9 final as well as
latest trunk) bails out with:
LLVM ERROR: Cannot select: 0x2510540: v8f32 = bitcast 0x2532270 [ID=16]
0x2532270: v4i64 = and 0x2532070, 0x2532170 [ID=15]
0x2532070: v4i64 = bitcast 0x2510740 [ID=14]
0x2510740: v8f32 = llvm.x86.avx.cmp.ps.256 0x2510640, 0x2511340,
0x2510f40, 0x2511140 [ORD=3] [ID=12]
...
The same counts for or and xor.
However, one specific example works:
define <8 x float> @test3(<8 x float> %a, <8 x float> %b, <8 x i32> %m)
nounwind readnone {
entry:
%cond = xor <8 x i32> %m, %m
%res = tail call <8 x float> @llvm.x86.avx.blendv.ps.256(<8 x float>
%a, <8 x float> %b, <8 x float> %cond) nounwind readnone
ret <8 x float> %res
}
This produces the expected (VXORPS + BLENDVPS), but the same fails for and/or.
In this case, no casting is required, which indicates that this is the actual
problem, not the instruction selection of the xor.
Apparently, LLVM is generally unable to handle bitcasts between <8 x i32> and
<8 x float> (and <4 x i64> vs. <4 x double>), which should always be allowed
for AVX as nops.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Fri Jun 3 07:27:32 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Fri, 3 Jun 2011 07:27:32 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10074] New: clang++ does not use env. variable
CPLUS_INCLUDE_PATH
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10074
Summary: clang++ does not use env. variable CPLUS_INCLUDE_PATH
Product: clang
Version: 2.9
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: simon at heisterkamp.dk
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
The following little test project compiles with g++ but not with clang++:
File: test/setup.sh:
> export CPLUS_INCLUDE_PATH="$PWD/include"
File test/include/a.h:
> int a=1;
File test/main.cxx:
> #include
> #include "sqr.h"
> int main (){ std::cout<<"a="<
References:
Message-ID: <20110603130731.B4DD92A6C12C@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10008
Eric Christopher changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #5 from Eric Christopher 2011-06-03 08:07:31 CDT ---
Applied thusly minus the ppc bits:
[issola:llvm/tools/clang] echristo% svn ci
Sending lib/Frontend/InitHeaderSearch.cpp
Transmitting file data .
Committed revision 132541.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Fri Jun 3 10:48:27 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Fri, 3 Jun 2011 10:48:27 -0500 (CDT)
Subject: [LLVMbugs] [Bug 8487] Switch statement miscompiled on 64-bit PowerPC
In-Reply-To:
References:
Message-ID: <20110603154827.3E56E2A6C12F@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=8487
Roman Divacky changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |rdivacky at freebsd.org
Resolution| |FIXED
--- Comment #5 from Roman Divacky 2011-06-03 10:48:26 CDT ---
Fixed in r132552.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Fri Jun 3 13:21:20 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Fri, 3 Jun 2011 13:21:20 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10073] "Cannot select" for bitcasts of AVX data
types
In-Reply-To:
References:
Message-ID: <20110603182120.909F22A6C12D@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10073
Nadav Rotem changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |nadav.rotem at intel.com
Resolution| |DUPLICATE
--- Comment #1 from Nadav Rotem 2011-06-03 13:21:19 CDT ---
Ralf, thanks for the detailed report. I am trying to gather the vector-select
bugs into a single bug reports. I am marking this one as a duplicate of 2314. I
started committing the vector-select patch (which required a type-legalization
refactoring and other changes all over the codegen). I plan to submit more
patches next week.
Cheers, Nadav
*** This bug has been marked as a duplicate of bug 2314 ***
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Fri Jun 3 15:19:45 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Fri, 3 Jun 2011 15:19:45 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10072] Necessary 'indirectbr' instruction is
dropped by optimizer [regression]
In-Reply-To:
References:
Message-ID: <20110603201945.A2C912A6C12C@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10072
Bill Wendling changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |wendling at apple.com
Resolution| |INVALID
--- Comment #1 from Bill Wendling 2011-06-03 15:19:45 CDT ---
In the particular example you gave, we get this after the first few
optimization passes:
[Irk:llvm] opt < mod.ll -S -mem2reg -globalopt -ipsccp -deadargelim
-instcombine
; ModuleID = ''
@xblkx.bbs = internal unnamed_addr constant [9 x i8*] [i8*
blockaddress(@xfuncx, %xblkx.begin), i8* blockaddress(@xfuncx, %xblkx.begin3),
i8* blockaddress(@xfuncx, %xblkx.begin4), i8* blockaddress(@xfuncx,
%xblkx.begin5), i8* blockaddress(@xfuncx, %xblkx.begin6), i8*
blockaddress(@xfuncx, %xblkx.begin7), i8* blockaddress(@xfuncx, %xblkx.begin8),
i8* blockaddress(@xfuncx, %xblkx.begin9), i8* blockaddress(@xfuncx,
%xblkx.end)]
define void @xfuncx() {
escape-string.top:
%xval202x = call i32 @xfunc5x()
br label %xlab5x
xlab8x: ; preds = %xlab5x
%xvaluex = call i32 @xselectorx()
%xblkx.x = getelementptr [9 x i8*]* @xblkx.bbs, i32 0, i32 %xvaluex
%xblkx.load = load i8** %xblkx.x
indirectbr i8* %xblkx.load, [label %xblkx.begin, label %xblkx.begin3, label
%xblkx.begin4, label %xblkx.begin5, label %xblkx.begin6, label %xblkx.begin7,
label %xblkx.begin8, label %xblkx.begin9, label %xblkx.end]
xblkx.begin: ; preds = %xlab8x
br label %xblkx.end
xblkx.begin3: ; preds = %xlab8x
br label %xblkx.end
xblkx.begin4: ; preds = %xlab8x
br label %xblkx.end
xblkx.begin5: ; preds = %xlab8x
br label %xblkx.end
xblkx.begin6: ; preds = %xlab8x
br label %xblkx.end
xblkx.begin7: ; preds = %xlab8x
br label %xblkx.end
xblkx.begin8: ; preds = %xlab8x
br label %xblkx.end
xblkx.begin9: ; preds = %xlab8x
br label %xblkx.end
xblkx.end: ; preds = %xblkx.begin9,
%xblkx.begin8, %xblkx.begin7, %xblkx.begin6, %xblkx.begin5, %xblkx.begin4,
%xblkx.begin3, %xblkx.begin, %xlab8x
%yes.0 = phi i1 [ false, %xblkx.begin ], [ true, %xlab8x ], [ false,
%xblkx.begin9 ], [ false, %xblkx.begin8 ], [ false, %xblkx.begin7 ], [ false,
%xblkx.begin6 ], [ false, %xblkx.begin5 ], [ false, %xblkx.begin4 ], [ false,
%xblkx.begin3 ]
br i1 %yes.0, label %v2j, label %xlab17x
v2j: ; preds = %xblkx.end
br label %xlab4x
xlab17x: ; preds = %xblkx.end
br label %xlab4x
xlab4x: ; preds = %xlab17x, %v2j
%incr19 = add i32 %xval704x.0, 1
br label %xlab5x
xlab5x: ; preds = %xlab4x,
%escape-string.top
%xval704x.0 = phi i32 [ 0, %escape-string.top ], [ %incr19, %xlab4x ]
%xval10x = icmp ult i32 %xval704x.0, %xval202x
br i1 %xval10x, label %xlab8x, label %xlab9x
xlab9x: ; preds = %xlab5x
ret void
}
The "simplifycfg" pass comes along and realizes that the result of all
indirectbr branches wind up in the same place, and so eliminates it:
[Irk:llvm] opt < mod.ll -S -mem2reg -globalopt -ipsccp -deadargelim
-instcombine -simplifycfg
; ModuleID = ''
@xblkx.bbs = internal unnamed_addr constant [9 x i8*] [i8*
blockaddress(@xfuncx, %xlab4x), i8* blockaddress(@xfuncx, %xlab4x), i8*
blockaddress(@xfuncx, %xlab4x), i8* blockaddress(@xfuncx, %xlab4x), i8*
blockaddress(@xfuncx, %xlab4x), i8* blockaddress(@xfuncx, %xlab4x), i8*
blockaddress(@xfuncx, %xlab4x), i8* blockaddress(@xfuncx, %xlab4x), i8*
blockaddress(@xfuncx, %xlab4x)]
define void @xfuncx() {
escape-string.top:
%xval202x = call i32 @xfunc5x()
br label %xlab5x
xlab8x: ; preds = %xlab5x
%xvaluex = call i32 @xselectorx()
br label %xlab4x
xlab4x: ; preds = %xlab8x
%incr19 = add i32 %xval704x.0, 1
br label %xlab5x
xlab5x: ; preds = %xlab4x,
%escape-string.top
%xval704x.0 = phi i32 [ 0, %escape-string.top ], [ %incr19, %xlab4x ]
%xval10x = icmp ult i32 %xval704x.0, %xval202x
br i1 %xval10x, label %xlab8x, label %xlab9x
xlab9x: ; preds = %xlab5x
ret void
}
Do you have another testcase which would show the failure? I.e., where all of
the branches of the indirectbr don't execute the same code? If so, please
reopen this bug.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Fri Jun 3 16:55:51 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Fri, 3 Jun 2011 16:55:51 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10075] New: Fast register allocator produces code
that uses a lot of stack
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10075
Summary: Fast register allocator produces code that uses a lot
of stack
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Register Allocator
AssignedTo: unassignedbugs at nondot.org
ReportedBy: rafael.espindola at gmail.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=6689)
--> (http://llvm.org/bugs/attachment.cgi?id=6689)
bitcode testcase
I know that the main objective of the fast register allocator is speed, but I
am getting test failures -O0 because the tests run out of stack space :-(
The results I got for the largest function by recompiling the .ii with gcc and
clang:
clang O0 0x00004690
gcc O0 0x00001560
clang O1 0x00000868
gcc O1 0x00000b98
clang O2 0x00000aa8
gcc O2 0x00000bd8
clang O3 0x00000ab8
gcc O3 0x00000bd8
clang Os 0x000010b8
gcc Os 0x00000698
I then found that most of the -O0 to -O1 difference was because of the register
allocator:
$ llc jsinterp.bc -o jsinterp.o -filetype=obj -regalloc=greedy -O0
$ otool -t -v jsinterp.o | grep -A 8
__ZN2js9InterpretEP9JSContextPNS_10StackFrameEjNS_10InterpModeE | grep sub.*rsp
000000000000001a subq $0x00001c78,%rsp
$ llc jsinterp.bc -o jsinterp.o -filetype=obj -regalloc=fast -O0
$ otool -t -v jsinterp.o | grep -A 8
__ZN2js9InterpretEP9JSContextPNS_10StackFrameEjNS_10InterpModeE | grep sub.*rsp
0000000000000010 subq $0x000045d8,%rsp
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Fri Jun 3 17:46:34 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Fri, 3 Jun 2011 17:46:34 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10076] New: Simple mixup of "abs" and "fabs" leads
to 65-line cascade of error messages
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10076
Summary: Simple mixup of "abs" and "fabs" leads to 65-line
cascade of error messages
Product: new-bugs
Version: 2.8
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: arthur.j.odwyer at gmail.com
CC: llvmbugs at cs.uiuc.edu
This wouldn't be terribly shocking if it were a different compiler, or if C++
templates were involved, but it really surprised me that:
(A) anything could lead to such an icky-looking dump from the normally
user-friendly Clang front-end;
(B) the majority of the dump seems to have been triggered by Clang's attempt to
be *more* helpful by suggesting that I might have misspelled "fabs"; and
(C) that it apparently takes seven or eight levels of macro magic and compiler
builtins to implement "fabs" in the math headers. Couldn't this be simplified
somehow?
Simple test case:
cat >test.cc < /* whoops! the user meant */
int main() { return abs(0); }
EOF
clang++ -c test.cc
I've pasted the output I got below (except multiply that by 6 since I used
"abs" six times in my original code, and every instance generated a new 60-line
cascade of errors).
$ clang++ Narrate.cc
Narrate.cc:143:9: error: use of undeclared identifier 'abs'; did you mean
'fabs'?
if (abs(fa.x - fb.x) <= 3) relatedness += 2;
^~~
fabs
In file included from Narrate.cc:3:
In file included from /usr/include/math.h:71:
/usr/include/bits/mathcalls.h:182:1: note: 'fabs' declared here
__MATHCALLX (fabs,, (_Mdouble_ __x), (__const__));
^
In file included from Narrate.cc:3:
/usr/include/math.h:60:3: note: instantiated from:
__MATHDECLX (_Mdouble_,function,suffix, args, attrib)
^
/usr/include/math.h:62:3: note: instantiated from:
__MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); \
^
/usr/include/math.h:65:15: note: instantiated from:
extern type __MATH_PRECNAME(function,suffix) args __THROW
^
/usr/include/math.h:68:33: note: instantiated from:
#define __MATH_PRECNAME(name,r) __CONCAT(name,r)
^
In file included from Narrate.cc:3:
In file included from /usr/include/math.h:71:
/usr/include/bits/mathcalls.h:182:1: note: instantiated from:
__MATHCALLX (fabs,, (_Mdouble_ __x), (__const__));
^
In file included from Narrate.cc:3:
/usr/include/math.h:60:3: note: instantiated from:
__MATHDECLX (_Mdouble_,function,suffix, args, attrib)
^
/usr/include/math.h:62:3: note: instantiated from:
__MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); \
^
/usr/include/math.h:65:15: note: instantiated from:
extern type __MATH_PRECNAME(function,suffix) args __THROW
^
In file included from Narrate.cc:3:
In file included from /usr/include/math.h:71:
/usr/include/bits/mathcalls.h:182:1: note: instantiated from:
__MATHCALLX (fabs,, (_Mdouble_ __x), (__const__));
^
In file included from Narrate.cc:3:
/usr/include/math.h:60:3: note: instantiated from:
__MATHDECLX (_Mdouble_,function,suffix, args, attrib)
^
/usr/include/math.h:62:3: note: instantiated from:
__MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); \
^
In file included from Narrate.cc:3:
In file included from /usr/include/math.h:71:
/usr/include/bits/mathcalls.h:182:1: note: instantiated from:
__MATHCALLX (fabs,, (_Mdouble_ __x), (__const__));
^
In file included from Narrate.cc:3:
/usr/include/math.h:60:3: note: instantiated from:
__MATHDECLX (_Mdouble_,function,suffix, args, attrib)
^
In file included from Narrate.cc:3:
In file included from /usr/include/math.h:71:
/usr/include/bits/mathcalls.h:182:1: note: instantiated from:
__MATHCALLX (fabs,, (_Mdouble_ __x), (__const__));
^
/usr/include/bits/mathcalls.h:182:14: note: instantiated from:
__MATHCALLX (fabs,, (_Mdouble_ __x), (__const__));
^
1 error generated.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Fri Jun 3 18:12:43 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Fri, 3 Jun 2011 18:12:43 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10077] New: Crash with -O0 -regalloc=greedy
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10077
Summary: Crash with -O0 -regalloc=greedy
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Register Allocator
AssignedTo: unassignedbugs at nondot.org
ReportedBy: rafael.espindola at gmail.com
CC: llvmbugs at cs.uiuc.edu
$ cat test.ll
%bar = type { i32 }
define i32 @foo() {
%tmp = extractvalue %bar undef, 0
ret i32 %tmp
}
Starting program: /Users/espindola/llvm/build-dbg/Debug+Asserts/bin/llc test.ll
-O0 -regalloc=greedy
Reading symbols for shared libraries ++. done
Assertion failed: (MRI->getVRegDef(reg) && "Register use before def!"),
function HandleVirtRegUse, file
/Users/espindola/llvm/llvm/lib/CodeGen/LiveVariables.cpp, line 128.
Program received signal SIGABRT, Aborted.
0x9906051e in __pthread_kill ()
(gdb) bt
#0 0x9906051e in __pthread_kill ()
#1 0x9905fdcb in pthread_kill ()
#2 0x00e36ce0 in raise (sig=6) at Signals.inc:281
#3 0x00e36dd2 in abort () at Signals.inc:298
#4 0x00e36da2 in __assert_rtn (func=0xf40729 "HandleVirtRegUse", file=0xf40680
"/Users/espindola/llvm/llvm/lib/CodeGen/LiveVariables.cpp", line=128,
expr=0xf4073a "MRI->getVRegDef(reg) && \"Register use before def!\"") at
Signals.inc:294
#5 0x0085f197 in llvm::LiveVariables::HandleVirtRegUse (this=0x2905800,
reg=2147483649, MBB=0x3031a84, MI=0x3031b04) at
/Users/espindola/llvm/llvm/lib/CodeGen/LiveVariables.cpp:128
#6 0x00861284 in llvm::LiveVariables::runOnMachineFunction (this=0x2905800,
mf=@0x2909220) at /Users/espindola/llvm/llvm/lib/CodeGen/LiveVariables.cpp:557
#7 0x00890b93 in llvm::MachineFunctionPass::runOnFunction (this=0x2905800,
F=@0x29016b0) at
/Users/espindola/llvm/llvm/lib/CodeGen/MachineFunctionPass.cpp:33
#8 0x00d0f852 in llvm::FPPassManager::runOnFunction (this=0x29024b0,
F=@0x29016b0) at /Users/espindola/llvm/llvm/lib/VMCore/PassManager.cpp:1513
#9 0x00d0fc31 in llvm::FPPassManager::runOnModule (this=0x29024b0,
M=@0x29013f0) at /Users/espindola/llvm/llvm/lib/VMCore/PassManager.cpp:1535
#10 0x00d0feb7 in llvm::MPPassManager::runOnModule (this=0x2902180,
M=@0x29013f0) at /Users/espindola/llvm/llvm/lib/VMCore/PassManager.cpp:1589
#11 0x00d10657 in llvm::PassManagerImpl::run (this=0x2901fc0, M=@0x29013f0) at
/Users/espindola/llvm/llvm/lib/VMCore/PassManager.cpp:1671
#12 0x00d10b57 in llvm::PassManager::run (this=0xbffff768, M=@0x29013f0) at
/Users/espindola/llvm/llvm/lib/VMCore/PassManager.cpp:1715
#13 0x00002954 in main (argc=4, argv=0xbffff8b4) at
/Users/espindola/llvm/llvm/tools/llc/llc.cpp:338
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Fri Jun 3 18:17:39 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Fri, 3 Jun 2011 18:17:39 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10078] New: LLVM test suite intolerant of '.' in
directory names
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10078
Summary: LLVM test suite intolerant of '.' in directory names
Product: new-bugs
Version: trunk
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: stuart at apple.com
CC: llvmbugs at cs.uiuc.edu
If you check out LLVM into a directory with '.' characters in the path, the %p
variable seems to be mis-expanded when running the LLVM test suite. This
causes bogus failures in the test suite.
Specifically, I had a copy of LLVM on my disk in
/Volumes/sandbox/stuart/llvmCore.clang.test2
I believe (at least) these failures were caused by the directory name with
period characters:
LLVM :: LLVMC/Alias.td
LLVM :: LLVMC/AppendCmdHook.td
LLVM :: LLVMC/EmptyCompilationGraph.td
LLVM :: LLVMC/EnvParentheses.td
LLVM :: LLVMC/ForwardAs.td
LLVM :: LLVMC/ForwardTransformedValue.td
LLVM :: LLVMC/ForwardValue.td
LLVM :: LLVMC/HookWithArguments.td
LLVM :: LLVMC/HookWithInFile.td
LLVM :: LLVMC/Init.td
LLVM :: LLVMC/LanguageMap.td
LLVM :: LLVMC/MultiValuedOption.td
LLVM :: LLVMC/MultipleCompilationGraphs.td
LLVM :: LLVMC/MultipleOutputLanguages.td
LLVM :: LLVMC/NoActions.td
LLVM :: LLVMC/NoCompilationGraph.td
LLVM :: LLVMC/OneOrMore.td
LLVM :: LLVMC/OptionPreprocessor.td
LLVM :: LLVMC/OutputSuffixHook.td
Obvious workaround: avoid period characters in directory names.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Fri Jun 3 20:58:46 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Fri, 3 Jun 2011 20:58:46 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10072] Necessary 'indirectbr' instruction is
dropped by optimizer [regression]
In-Reply-To:
References:
Message-ID: <20110604015847.03FC02A6C12C@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10072
Yuri changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
--- Comment #2 from Yuri 2011-06-03 20:58:46 CDT ---
I don't think you are right.
My original testcase has the last label xblkx.end which doesn't do what all
other labels do.
Labels xblkx.begin to xblkx.begin9 (8 of them) all set 'yes' variable to 1
(from 0). But label xblkx.end is also in 'indirectbr' but doesn't do that.
Therefore 'indirectbr' or its equivalent should survive optimization. And it
doesn't. In fact, my really original testcase (that I simplified into this one)
produces wrong result with optimization and correct result without it, which
should never ever happen.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Sat Jun 4 04:35:02 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Sat, 4 Jun 2011 04:35:02 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10079] New: -mtune not supportd to the assembler
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10079
Summary: -mtune not supportd to the assembler
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: nicholas at mxc.ca
CC: llvmbugs at cs.uiuc.edu
$ clang -c -Wa,-mtune=i686 conftest.c
clang: error: unsupported argument '-mtune=i686' to option '-Wa,'
To my surprise, GNU as actually has this flag. I'm not sure if there's anything
to wire it up to in MC (what does it actually do in GNU as?), but it'd be
useful if we didn't error on it.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Sat Jun 4 04:42:30 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Sat, 4 Jun 2011 04:42:30 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10072] Necessary 'indirectbr' instruction is
dropped by optimizer [regression]
In-Reply-To:
References:
Message-ID: <20110604094230.A8C612A6C12C@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10072
Bill Wendling changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #7 from Bill Wendling 2011-06-04 04:42:29 CDT ---
Ah! Okay. I see what the problem is. :-)
Fixed here r132638.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Sat Jun 4 06:24:31 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Sat, 4 Jun 2011 06:24:31 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10080] New: Crash on ill-formed alias-template code
causing a dependent function declaration
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10080
Summary: Crash on ill-formed alias-template code causing a
dependent function declaration
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++0x
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: schaub.johannes at googlemail.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
This code crashes clang (trunk 132184):
template using Fn = void(T);
template Fn f; // ill-formed!
int main() { f(0); }
The line marked with "ill-formed" should be rejected, according to FDIS,
14.3.1p3.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Sat Jun 4 10:35:25 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Sat, 4 Jun 2011 10:35:25 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10081] New: c backend emits multiple definitions of
global variables
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10081
Summary: c backend emits multiple definitions of global
variables
Product: new-bugs
Version: 2.9
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: matt at pharr.org
CC: llvmbugs at cs.uiuc.edu
There is a one-character typo in CBackend.cpp that causes global variable
definitions to be emitted multiple times (and thence, compilation of the
generated C code to fail when globals are present in the input IR.) The loop
that is supposed to only emit declarations has an extra '!'; fix is below.
diff --git a/lib/Target/CBackend/CBackend.cpp
b/lib/Target/CBackend/CBackend.cpp
index fde2e29..70ea9b9 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -1885,7 +1885,7 @@ bool CWriter::doInitialization(Module &M) {
Out << "\n\n/* Global Variable Declarations */\n";
for (Module::global_iterator I = M.global_begin(), E = M.global_end();
I != E; ++I)
- if (!I->isDeclaration()) {
+ if (I->isDeclaration()) {
// Ignore special globals, such as debug info.
if (getGlobalVariableClass(I))
continue;
(This bug is present in both 2.9 and TOT.)
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Sat Jun 4 10:51:54 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Sat, 4 Jun 2011 10:51:54 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10082] New: invalid cast assertion
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10082
Summary: invalid cast assertion
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: marc.glisse at normalesup.org
CC: llvmbugs at cs.uiuc.edu
clang++ -O2 a.cc -c
fails with an invalid cast assertion. This may or may not be related to bug
8769 (I discovered this one when I finally removed the workaround for 8769).
template struct array {
float _M_instance[3] __attribute__((__aligned__));
const float& operator[](int __n) const {
return _M_instance[__n];
}
};
struct PointC3 {
array base;
const float & x() const {
return base[0];
}
};
struct Point_3 : public PointC3 {
};
struct Equal_3 {
bool operator()(const PointC3 &p, const PointC3 &q) const {
return p.x() == q.x();
}
};
Equal_3 equal_3_object();
inline bool operator==(const Point_3& p, const Point_3& q) {
return equal_3_object()(p, q);
}
Point_3 f();
int main() {
f() == f();
}
clang: /data/repos/llvm/lib/VMCore/Instructions.cpp:2079: static
llvm::CastInst* llvm::CastInst::Create(llvm::Instruction::CastOps,
llvm::Value*, const llvm::Type*, const llvm::Twine&, llvm::Instruction*):
Assertion `castIsValid(op, S, Ty) && "Invalid cast!"' failed.
0 clang 0x0000000001ab601f
1 clang 0x0000000001ab6b5a
2 libpthread.so.0 0x00007ff490785020
3 libc.so.6 0x00007ff48fa7f3d5 gsignal + 53
4 libc.so.6 0x00007ff48fa82650 abort + 384
5 libc.so.6 0x00007ff48fa78581 __assert_fail + 241
6 clang 0x00000000019bfcad
7 clang 0x00000000007fca66 llvm::IRBuilder
>::CreateCast(llvm::Instruction::CastOps, llvm::Value*, llvm::Type const*,
llvm::Twine const&) + 118
8 clang 0x0000000001779276
9 clang 0x0000000001779c84
10 clang 0x0000000001779b4c
11 clang 0x0000000001779a01
12 clang 0x000000000177e339
13 clang 0x0000000001780f49
14 clang 0x00000000019e296f
llvm::FPPassManager::runOnFunction(llvm::Function&) + 655
15 clang 0x0000000001862727
16 clang 0x0000000001864aee
17 clang 0x00000000019e2467
llvm::MPPassManager::runOnModule(llvm::Module&) + 551
18 clang 0x00000000019e25cb llvm::PassManagerImpl::run(llvm::Module&)
+ 187
19 clang 0x00000000007cf0f7
clang::EmitBackendOutput(clang::Diagnostic&, clang::CodeGenOptions const&,
clang::TargetOptions const&, llvm::Module*, clang::BackendAction,
llvm::raw_ostream*) + 2967
20 clang 0x00000000007cce8b
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 251
21 clang 0x000000000092362f clang::ParseAST(clang::Sema&, bool) + 351
22 clang 0x00000000007cba94 clang::CodeGenAction::ExecuteAction() +
68
23 clang 0x00000000006ca233
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 371
24 clang 0x00000000006a306a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1290
25 clang 0x000000000069783b cc1_main(char const**, char const**, char
const*, void*) + 779
26 clang 0x00000000006a1f43 main + 7667
27 libc.so.6 0x00007ff48fa6bead __libc_start_main + 253
28 clang 0x0000000000697349
Stack dump:
0. Program arguments: /tmp/clang/inst/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name a.cc
-mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -target-linker-version 2.21.51.20110523
-momit-leaf-frame-pointer -coverage-file a.o -resource-dir
/tmp/clang/inst/bin/../lib/clang/3.0 -O2 -fdeprecated-macro -ferror-limit 19
-fmessage-length 0 -fcxx-exceptions -fexceptions -fgnu-runtime
-fdiagnostics-show-option -o a.o -x c++ a.cc
1. parser at end of file
2. Per-module optimization passes
3. Running pass 'CallGraph Pass Manager' on module 'a.cc'.
4. Running pass 'Scalar Replacement of Aggregates (SSAUp)' on function
'@main'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal 2 (use -v to see
invocation)
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Sun Jun 5 00:04:43 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Sun, 5 Jun 2011 00:04:43 -0500 (CDT)
Subject: [LLVMbugs] [Bug 9982] Templated function returning an apple-block
throwing assertion
In-Reply-To:
References:
Message-ID: <20110605050443.4EA892A6C124@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=9982
Douglas Gregor changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Douglas Gregor 2011-06-05 00:04:41 CDT ---
Fixed in Clang r132657.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Sun Jun 5 00:39:51 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Sun, 5 Jun 2011 00:39:51 -0500 (CDT)
Subject: [LLVMbugs] [Bug 9983] clang crashes when using std::bind with a
non-static method
In-Reply-To:
References:
Message-ID: <20110605053951.5200E2A6C124@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=9983
Douglas Gregor changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #5 from Douglas Gregor 2011-06-05 00:39:50 CDT ---
Fixed in Clang r132659.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Sun Jun 5 01:16:05 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Sun, 5 Jun 2011 01:16:05 -0500 (CDT)
Subject: [LLVMbugs] [Bug 9507] Lvalue transformation not ignored when
parameter is a const-reference
In-Reply-To:
References:
Message-ID: <20110605061605.8057F2A6C12D@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=9507
Douglas Gregor changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Douglas Gregor 2011-06-05 01:16:05 CDT ---
Fixed in Clang r132660.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Sun Jun 5 11:01:56 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Sun, 5 Jun 2011 11:01:56 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10084] New: Clang doesn't know about Ubuntu Oneiric
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10084
Summary: Clang doesn't know about Ubuntu Oneiric
Product: clang
Version: trunk
Platform: All
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Driver
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: themiwi at users.sourceforge.net
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=6694)
--> (http://llvm.org/bugs/attachment.cgi?id=6694)
Patch adding Ubuntu Oneiric handling
In lib/Driver/ToolChains.cpp the enum and detection for Ubuntu Oneiric is
missing.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Sun Jun 5 11:09:26 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Sun, 5 Jun 2011 11:09:26 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10084] Clang doesn't know about Ubuntu Oneiric
In-Reply-To:
References:
Message-ID: <20110605160926.1500A2A6C124@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10084
Benjamin Kramer changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |benny.kra at gmail.com
Resolution| |FIXED
--- Comment #1 from Benjamin Kramer 2011-06-05 11:09:25 CDT ---
M lib/Driver/ToolChains.cpp
Committed r132669
Thanks for the patch.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Sun Jun 5 16:31:16 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Sun, 5 Jun 2011 16:31:16 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10085] New: cannot select unknown target node #197
(long double)
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10085
Summary: cannot select unknown target node #197 (long double)
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
AssignedTo: unassignedbugs at nondot.org
ReportedBy: nlewycky at google.com
CC: llvmbugs at cs.uiuc.edu
This straight-line C code crashes clang:
int signbitl (long double x) {
__extension__ union { long double l; int i[3]; } u;
u.l = x;
return (u.i[2] & 0x8000) != 0;
}
when targeting x86-64 and under -O2:
fatal error: error in backend: Cannot select: 0x58c8d20: i32 = <> 0x58c30b0, 0x58c8c20 [ID=7]
0x58c30b0: f80,ch = load 0x58893b8, 0x58c2eb0,
0x58c2fb0 [ORD=1] [ID=6]
0x58c2eb0: i64 = FrameIndex<-1> [ORD=1] [ID=1]
0x58c2fb0: i64 = undef [ORD=1] [ID=2]
0x58c8c20: i32 = Constant<1> [ID=5]
For reference the LLVM IR is:
target datalayout =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"
define i32 @signbitl(x86_fp80 %x) nounwind uwtable readnone {
entry:
%tmp4 = bitcast x86_fp80 %x to i80
%tmp4.lobit = lshr i80 %tmp4, 79
%tmp = trunc i80 %tmp4.lobit to i32
ret i32 %tmp
}
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Sun Jun 5 17:44:34 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Sun, 5 Jun 2011 17:44:34 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10053] [QoI] diagnostic in case of two-stage name
lookup-related errors could be better
In-Reply-To:
References:
Message-ID: <20110605224434.AE4C62A6C12C@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10053
Richard Smith changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #3 from Richard Smith 2011-06-05 17:44:33 CDT ---
Fixed in r132672. We now produce:
my_file.cpp:2:10: error: call to function 'Multiply' that is neither visible
in the template definition nor found by argument dependent lookup
return Multiply(x, x);
^
my_file.cpp:10:3: note: in instantiation of function template specialization
'Squared' requested here
Squared(5);
^
my_file.cpp:5:5: note: 'Multiply' should be declared prior to the call site
int Multiply(int x, int y) {
^
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Mon Jun 6 00:48:04 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Mon, 6 Jun 2011 00:48:04 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10077] Crash with -O0 -regalloc=greedy
In-Reply-To:
References:
Message-ID: <20110606054804.16AB12A6C124@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10077
Eli Friedman changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |sharparrow1 at yahoo.com
Resolution| |FIXED
--- Comment #1 from Eli Friedman 2011-06-06 00:48:03 CDT ---
r132676.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Mon Jun 6 05:00:45 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Mon, 6 Jun 2011 05:00:45 -0500 (CDT)
Subject: [LLVMbugs] [Bug 9595] [klee] llvm::APInt::operator|=(const
llvm::APInt&): Assertion `BitWidth == RHS.BitWidth && "Bit widths must be
the same"' failed.
In-Reply-To:
References:
Message-ID: <20110606100045.A3ABD2A6C12C@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=9595
arrowdodger <6yearold at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |6yearold at gmail.com
Resolution| |FIXED
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Mon Jun 6 09:51:34 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Mon, 6 Jun 2011 09:51:34 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10086] New: Explicit Template Instantiation without
Original Template Definition
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10086
Summary: Explicit Template Instantiation without Original
Template Definition
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: ythrier at hsr.ch
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
CLANG seems to accept explicit template instantiation without a previous
template definition. The following example is accepted by clang++, but rejected
by g++:
[Example "A.cpp"
template void foobar(int i) {
// ...
}
int main() {
foobar(5);
}
end example]
~$clang++ A.cpp // Accept
~$g++ A.cpp // 'foobar' is not a template function
CLANG may threat the function as some kind of "overload", because in the
example, "foobar" is defined with a body statement. After removing the function
body, CLANG rejects the example code. However, the original situation should
not be possible. The example is accepted by g++ if a previous template
definition exists.
Regards
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Mon Jun 6 10:23:52 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Mon, 6 Jun 2011 10:23:52 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10024] Assertion hit when specializing a member
function of a template
In-Reply-To:
References:
Message-ID: <20110606152352.3B21F2A6C12D@llvm.org>
http://llvm.org/bugs/show_bug.cgi?id=10024
Douglas Gregor changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Douglas Gregor 2011-06-06 10:23:51 CDT ---
Fixed in Clang r132677.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
From bugzilla-daemon at llvm.org Mon Jun 6 10:47:01 2011
From: bugzilla-daemon at llvm.org (bugzilla-daemon at llvm.org)
Date: Mon, 6 Jun 2011 10:47:01 -0500 (CDT)
Subject: [LLVMbugs] [Bug 10087] New: Regression: Compile error with a map of
strings
Message-ID:
http://llvm.org/bugs/show_bug.cgi?id=10087
Summary: Regression: Compile error with a map of strings
Product: libc++
Version: unspecified
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
AssignedTo: hhinnant at apple.com
ReportedBy: jonathan.sauer at gmx.de
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=6697)
--> (http://llvm.org/bugs/attachment.cgi?id=6697)
Complete log file
Hello,
the following program does not compile with current clang and current libc++:
#include
#include