[llvm-commits] [llvm] r170546 - in /llvm/trunk: include/llvm/Target/TargetLowering.h test/Transforms/LoopVectorize/X86/no-vector.ll
Reed Kotler
rkotler at mips.com
Sat Dec 29 13:17:56 PST 2012
This change caused a regression in the Mips compiler.
rkotler at laptop-rkotler:~/test$ ~/llvm/install/bin/clang++ -target
mipsel-linux-gnu -c -O3 test.cc -S -v
clang version 3.3 (gitosis at dmz-portal.mips.com:clang.git
16f90bfe53ed637156c315cbbeddcf2d91266d67)
(gitosis at dmz-portal.mips.com:llvm.git
35d346294128038794637b384fcc5f97ff3d9978)
Target: mipsel--linux-gnu
Thread model: posix
"/home/rkotler/llvm/install/bin/clang" -cc1 -triple mipsel--linux-gnu
-S -disable-free -main-file-name test.cc -mrelocation-model static
-mdisable-fp-elim -fmath-errno -mconstructor-aliases -target-cpu mips32
-target-abi o32 -mfloat-abi hard -target-linker-version 2.20.1
-momit-leaf-frame-pointer -v -coverage-file /home/rkotler/test/test.s
-resource-dir /home/rkotler/llvm/install/bin/../lib/clang/3.3
-fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem
/usr/local/include -internal-isystem
/home/rkotler/llvm/install/bin/../lib/clang/3.3/include
-internal-externc-isystem /include -internal-externc-isystem
/usr/include -O3 -fdeprecated-macro -fno-dwarf-directory-asm
-fdebug-compilation-dir /home/rkotler/test -ferror-limit 19
-fmessage-length 80 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics
-backend-option -vectorize-loops -o test.s -x c++ test.cc
clang -cc1 version 3.3 based upon LLVM 3.3svn default target
i386-pc-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/home/rkotler/llvm/install/bin/../lib/clang/3.3/include
/usr/include
End of search list.
ExpandIntegerOperand Op #2: 0xcaffe20: i32,i32 = sra_parts 0xcaf96b0,
0xcaf97c0, 0xcaf2208 [ID=0]
Do not know how to expand this operator's operand!
UNREACHABLE executed at
/home/rkotler/workspace/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:2451!
0 clang 0x0a68f122
1 clang 0x0a68ed79
2 0x00915400 __kernel_sigreturn + 0
3 libc.so.6 0x00284ab2 abort + 386
4 clang 0x0a6778ff
5 clang 0x09f76d70
6 clang 0x09f1a106
7 clang 0x09f1e7ae llvm::SelectionDAG::LegalizeTypes() + 68
8 clang 0x09ec9903 llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 1061
9 clang 0x09ec91e1
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction
const>, llvm::ilist_iterator<llvm::Instruction const>, bool&) + 219
10 clang 0x09ecbdb9
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 2559
11 clang 0x09ec86e9
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 723
12 clang 0x09aaf454
13 clang 0x0a04ac09
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 87
14 clang 0x0a61a78e
llvm::FPPassManager::runOnFunction(llvm::Function&) + 306
15 clang 0x0a61a935 llvm::FPPassManager::runOnModule(llvm::Module&) + 97
16 clang 0x0a61ac46 llvm::MPPassManager::runOnModule(llvm::Module&)
+ 498
17 clang 0x0a61b1e0 llvm::PassManagerImpl::run(llvm::Module&) + 234
18 clang 0x0a61b4f9 llvm::PassManager::run(llvm::Module&) + 39
19 clang 0x089bc748
20 clang 0x089bc7da
clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&,
clang::LangOptions const&, llvm::Module*, clang::BackendAction,
llvm::raw_ostream*) + 77
21 clang 0x089b88d2
22 clang 0x08b66f56 clang::ParseAST(clang::Sema&, bool, bool) + 690
23 clang 0x087af50e clang::ASTFrontendAction::ExecuteAction() + 284
24 clang 0x089b7a13 clang::CodeGenAction::ExecuteAction() + 1065
25 clang 0x087af144 clang::FrontendAction::Execute() + 180
26 clang 0x08787e8e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 748
27 clang 0x0875b03a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 918
28 clang 0x0874c62f cc1_main(char const**, char const**, char
const*, void*) + 805
29 clang 0x08755f02 main + 521
30 libc.so.6 0x0026dbd6 __libc_start_main + 230
31 clang 0x0874bd61
Stack dump:
0. Program arguments: /home/rkotler/llvm/install/bin/clang -cc1 -triple
mipsel--linux-gnu -S -disable-free -main-file-name test.cc
-mrelocation-model static -mdisable-fp-elim -fmath-errno
-mconstructor-aliases -target-cpu mips32 -target-abi o32 -mfloat-abi
hard -target-linker-version 2.20.1 -momit-leaf-frame-pointer -v
-coverage-file /home/rkotler/test/test.s -resource-dir
/home/rkotler/llvm/install/bin/../lib/clang/3.3 -fmodule-cache-path
/var/tmp/clang-module-cache -internal-isystem /usr/local/include
-internal-isystem
/home/rkotler/llvm/install/bin/../lib/clang/3.3/include
-internal-externc-isystem /include -internal-externc-isystem
/usr/include -O3 -fdeprecated-macro -fno-dwarf-directory-asm
-fdebug-compilation-dir /home/rkotler/test -ferror-limit 19
-fmessage-length 80 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics
-backend-option -vectorize-loops -o test.s -x c++ test.cc
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'test.cc'.
4. Running pass 'MIPS DAG->DAG Pattern Instruction Selection' on
function '@_Z3fooi'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.3 (gitosis at dmz-portal.mips.com:clang.git
16f90bfe53ed637156c315cbbeddcf2d91266d67)
(gitosis at dmz-portal.mips.com:llvm.git
35d346294128038794637b384fcc5f97ff3d9978)
Target: mipsel--linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed
source, and associated run script.
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/test-Ak0ymz.cpp
clang: note: diagnostic msg: /tmp/test-Ak0ymz.sh
clang: note: diagnostic msg:
********************
On 12/19/2012 06:34 AM, Benjamin Kramer wrote:
> Author: d0k
> Date: Wed Dec 19 08:34:28 2012
> New Revision: 170546
>
> URL: http://llvm.org/viewvc/llvm-project?rev=170546&view=rev
> Log:
> Make TargetLowering::getTypeConversion more resilient against odd illegal MVTs.
>
> - An MVT can become an EVT when being split (e.g. v2i8 -> v1i8, the latter doesn't exist)
> - Return the scalar value when an MVT is scalarized (v1i64 -> i64)
>
> Fixes PR14639ff.
>
> Added:
> llvm/trunk/test/Transforms/LoopVectorize/X86/no-vector.ll
> Modified:
> llvm/trunk/include/llvm/Target/TargetLowering.h
>
> Modified: llvm/trunk/include/llvm/Target/TargetLowering.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=170546&r1=170545&r2=170546&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Target/TargetLowering.h (original)
> +++ llvm/trunk/include/llvm/Target/TargetLowering.h Wed Dec 19 08:34:28 2012
> @@ -2005,8 +2005,11 @@
> && "Promote may not follow Expand or Promote");
>
> if (LA == TypeSplitVector)
> - NVT = MVT::getVectorVT(SVT.getVectorElementType(),
> - SVT.getVectorNumElements() / 2);
> + return LegalizeKind(LA, EVT::getVectorVT(Context,
> + SVT.getVectorElementType(),
> + SVT.getVectorNumElements()/2));
> + if (LA == TypeScalarizeVector)
> + return LegalizeKind(LA, SVT.getVectorElementType());
> return LegalizeKind(LA, NVT);
> }
>
>
> Added: llvm/trunk/test/Transforms/LoopVectorize/X86/no-vector.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopVectorize/X86/no-vector.ll?rev=170546&view=auto
> ==============================================================================
> --- llvm/trunk/test/Transforms/LoopVectorize/X86/no-vector.ll (added)
> +++ llvm/trunk/test/Transforms/LoopVectorize/X86/no-vector.ll Wed Dec 19 08:34:28 2012
> @@ -0,0 +1,22 @@
> +; RUN: opt -S -mtriple=i386-unknown-freebsd -mcpu=i486 -loop-vectorize < %s
> +
> +define i32 @PR14639(i8* nocapture %s, i32 %len) nounwind {
> +entry:
> + %cmp4 = icmp sgt i32 %len, 0
> + br i1 %cmp4, label %for.body, label %for.end
> +
> +for.body: ; preds = %entry, %for.body
> + %i.06 = phi i32 [ %inc, %for.body ], [ 0, %entry ]
> + %r.05 = phi i32 [ %xor, %for.body ], [ 0, %entry ]
> + %arrayidx = getelementptr inbounds i8* %s, i32 %i.06
> + %0 = load i8* %arrayidx, align 1
> + %conv = sext i8 %0 to i32
> + %xor = xor i32 %conv, %r.05
> + %inc = add nsw i32 %i.06, 1
> + %exitcond = icmp eq i32 %inc, %len
> + br i1 %exitcond, label %for.end, label %for.body
> +
> +for.end: ; preds = %for.body, %entry
> + %r.0.lcssa = phi i32 [ 0, %entry ], [ %xor, %for.body ]
> + ret i32 %r.0.lcssa
> +}
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cc
Type: text/x-c++src
Size: 310 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121229/314b9ebb/attachment.cc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-Ak0ymz.cpp
Type: text/x-c++src
Size: 343 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121229/314b9ebb/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-Ak0ymz.sh
Type: application/x-shellscript
Size: 550 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121229/314b9ebb/attachment.bin>
More information about the llvm-commits
mailing list