[llvm-bugs] [Bug 31161] New: Crash when using vector long long or vector double operator manipulation with altivec
https://llvm.org/bugs/show_bug.cgi?id=31161 Bug ID: 31161 Summary: Crash when using vector long long or vector double operator manipulation with altivec Product: clang Version: trunk Hardware: Other OS: Linux Status: NEW Severity: normal Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: westion...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified int main(){ vector long long a = {1,2}; vector long long b = {1,2}; vector double c = {1.1,2.1}; vector double d = {1.1,2.1}; if(ab); if(a==b); if(cd); if(c==d); } it crashes. As vector int and vector float work well. It should call related llvm builtins. example.C int main(){ vector int a = {1,2}; vector int b = {1,2}; vector float c = {1.1,2.1}; vector float d = {1.1,2.1}; if(ab); if(a==b); if(cd); if(c==d); } cat example.ll | grep llvm. %8 = call i32 @llvm.ppc.altivec.vcmpgtsw.p(i32 2, <4 x i32> %7, <4 x i32> %6) %13 = call i32 @llvm.ppc.altivec.vcmpgtsw.p(i32 2, <4 x i32> %11, <4 x i32> %12) %18 = call i32 @llvm.ppc.altivec.vcmpequw.p(i32 2, <4 x i32> %16, <4 x i32> %17) %23 = call i32 @llvm.ppc.altivec.vcmpgtfp.p(i32 2, <4 x float> %22, <4 x float> %21) %28 = call i32 @llvm.ppc.altivec.vcmpgtfp.p(i32 2, <4 x float> %26, <4 x float> %27) %33 = call i32 @llvm.ppc.altivec.vcmpeqfp.p(i32 2, <4 x float> %31, <4 x float> %32) declare i32 @llvm.ppc.altivec.vcmpgtsw.p(i32, <4 x i32>, <4 x i32>) #1 declare i32 @llvm.ppc.altivec.vcmpequw.p(i32, <4 x i32>, <4 x i32>) #1 declare i32 @llvm.ppc.altivec.vcmpgtfp.p(i32, <4 x float>, <4 x float>) #1 declare i32 @llvm.ppc.altivec.vcmpeqfp.p(i32, <4 x float>, <4 x float>) #1 -- You are receiving this mail because: You are on the CC list for the bug. ___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 26322] Core load hangs
https://llvm.org/bugs/show_bug.cgi?id=26322 lab...@google.com changed: What|Removed |Added Status|ASSIGNED|RESOLVED CC||lab...@google.com Resolution|--- |FIXED --- Comment #3 from lab...@google.com --- Marking the bug as closed. -- You are receiving this mail because: You are on the CC list for the bug. ___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 31162] New: LLVM (Clang) failed to optimized little-endian integer composition
https://llvm.org/bugs/show_bug.cgi?id=31162 Bug ID: 31162 Summary: LLVM (Clang) failed to optimized little-endian integer composition Product: new-bugs Version: trunk Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P Component: new bugs Assignee: unassignedb...@nondot.org Reporter: peetluge...@yandex.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Clang/LLVM is unable to optimize this: uint32_t read32le(const uint8_t* ptr) { return (static_cast(ptr[0])& 0x00FFu) | ((static_cast(ptr[1]) << 8) & 0xFF00u) | ((static_cast(ptr[2]) << 16) & 0x00FFu) | ((static_cast(ptr[3]) << 24) & 0xFF00u); } LLVM code: read32le(unsigned char const*): movzx eax, byte ptr [rdi] movzx ecx, byte ptr [rdi + 1] shl ecx, 8 or ecx, eax movzx edx, byte ptr [rdi + 2] shl edx, 16 or edx, ecx movzx eax, byte ptr [rdi + 3] shl eax, 24 or eax, edx ret GCC (7) code: read32le(unsigned char const*): mov eax, DWORD PTR [rdi] ret -- You are receiving this mail because: You are on the CC list for the bug. ___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 31163] New: "using I = int" makes Clang crash if "I" is also a name of a constant in another scope.
https://llvm.org/bugs/show_bug.cgi?id=31163 Bug ID: 31163 Summary: "using I = int" makes Clang crash if "I" is also a name of a constant in another scope. Product: clang Version: 3.9 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: officesamu...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified The following code makes Clang crash if compiled with -std=c++14 #include template void foo() { constexpr int I = 0; std::get(Tuple()); } int main() { foo>(); } // Remove this and the crash is gone using I = int; Output: ~/tmp$ clang++-3.9 ClangCrash.cpp -std=c++14 -stdlib=libc++ #0 0x0157a335 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/home/brd/soft/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang-3.9+0x157a335) #1 0x0157a996 SignalHandler(int) (/home/brd/soft/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang-3.9+0x157a996) #2 0x7fbecb4e1330 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10330) #3 0x02923870 clang::NestedNameSpecifier::containsUnexpandedParameterPack() const (/home/brd/soft/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang-3.9+0x2923870) #4 0x027cc7f5 clang::ASTContext::getDependentNameType(clang::ElaboratedTypeKeyword, clang::NestedNameSpecifier*, clang::IdentifierInfo const*, clang::QualType) const (/home/brd/soft/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang-3.9+0x27cc7f5) #5 0x024cced7 clang::Sema::CheckTemplateTypeArgument(clang::TemplateTypeParmDecl*, clang::TemplateArgumentLoc&, llvm::SmallVectorImpl&) (/home/brd/soft/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang-3.9+0x24cced7) #6 0x024cdefd clang::Sema::CheckTemplateArgument(clang::NamedDecl*, clang::TemplateArgumentLoc&, clang::NamedDecl*, clang::SourceLocation, clang::SourceLocation, unsigned int, llvm::SmallVectorImpl&, clang::Sema::CheckTemplateArgumentKind) (/home/brd/soft/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang-3.9+0x24cdefd) #7 0x024c61f1 clang::Sema::CheckTemplateArgumentList(clang::TemplateDecl*, clang::SourceLocation, clang::TemplateArgumentListInfo&, bool, llvm::SmallVectorImpl&) (/home/brd/soft/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang-3.9+0x24c61f1) #8 0x0250b5af clang::Sema::SubstituteExplicitTemplateArguments(clang::FunctionTemplateDecl*, clang::TemplateArgumentListInfo&, llvm::SmallVectorImpl&, llvm::SmallVectorImpl&, clang::QualType*, clang::sema::TemplateDeductionInfo&) (/home/brd/soft/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang-3.9+0x250b5af) #9 0x0250dbd0 clang::Sema::DeduceTemplateArguments(clang::FunctionTemplateDecl*, clang::TemplateArgumentListInfo*, llvm::ArrayRef, clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&, bool) (/home/brd/soft/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang-3.9+0x250dbd0) #10 0x0245cccd clang::Sema::AddTemplateOverloadCandidate(clang::FunctionTemplateDecl*, clang::DeclAccessPair, clang::TemplateArgumentListInfo*, llvm::ArrayRef, clang::OverloadCandidateSet&, bool, bool) (/home/brd/soft/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang-3.9+0x245cccd) #11 0x0246dfbf clang::Sema::AddOverloadedCallCandidates(clang::UnresolvedLookupExpr*, llvm::ArrayRef, clang::OverloadCandidateSet&, bool) (/home/brd/soft/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang-3.9+0x246dfbf) #12 0x0246e180 clang::Sema::buildOverloadedCallSet(clang::Scope*, clang::Expr*, clang::UnresolvedLookupExpr*, llvm::MutableArrayRef, clang::SourceLocation, clang::OverloadCandidateSet*, clang::ActionResult*) (/home/brd/soft/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang-3.9+0x246e180) #13 0x0246e4aa clang::Sema::BuildOverloadedCallExpr(clang::Scope*, clang::Expr*, clang::UnresolvedLookupExpr*, clang::SourceLocation, llvm::MutableArrayRef, clang::SourceLocation, clang::Expr*, bool, bool) (/home/brd/soft/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang-3.9+0x246e4aa) #14 0x022c9e42 clang::Sema::ActOnCallExpr(clang::Scope*, clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef, clang::SourceLocation, clang::Expr*, bool) (/home/brd/soft/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang-3.9+0x22c9e42) #15 0x02547c79 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformCallExpr(clang::CallExpr*) (/home/brd/soft/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang-3.9+0x2547c79) #16 0x02541668 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformStmt(clang::Stmt*) (/home/brd/soft/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang-3.9+0x2541668) #17 0x02552271 clang::TreeTransform<(anonymous
[llvm-bugs] [Bug 31164] New: x64 backend creates unnecessary setcc instructions
https://llvm.org/bugs/show_bug.cgi?id=31164 Bug ID: 31164 Summary: x64 backend creates unnecessary setcc instructions Product: tools Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: llc Assignee: unassignedb...@nondot.org Reporter: e...@arbat.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified An i1 phi is cleverly placed in the processor status word, but then when we want to branch on it, it is materialized in a setcc-testb-je sequence instead of just a jne instruction. Input .ll: define i64 @foo(i64, i64, i64) { %4 = icmp eq i64 %0, 0 br i1 %4, label %left, label %right left: %l = icmp eq i64 %1, 1 br label %join right: %r = icmp eq i64 %1, %2 br label %join join: %lr = phi i1 [%l, %left], [%r, %right] %iszero = icmp eq i1 %lr, 0 br i1 %iszero, label %left2, label %right2 left2: ret i64 %2 right2: ret i64 %0 } Output x64 foo:# @foo .cfi_startproc # BB#0: testq %rdi, %rdi je .LBB0_1 # BB#2: # %right cmpq%rdx, %rsi jmp .LBB0_3 .LBB0_1:# %left cmpq$1, %rsi .LBB0_3:# %join sete%al testb %al, %al je .LBB0_4 # BB#5: # %right2 movq%rdi, %rax retq .LBB0_4:# %left2 movq%rdx, %rax retq See http://pastebin.com/UinMkFr1 and http://pastebin.com/Su1b1mxj for syntax coloured versions. The sete and testb instructions are superfluous. -- You are receiving this mail because: You are on the CC list for the bug. ___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs