[llvm-commits] [llvm] r170532 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/TargetLowering.cpp lib/Target/ARM/ARMISelLowering.cpp lib/Target/ARM/ARMISelLowering.h lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h

Reed Kotler rkotler at mips.com
Fri Dec 28 23:26:00 PST 2012


This patch caused a regression in the Mips compiler.

kotler 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 
c698d3a2a40f0909d16cbe857685f0f22cb9ae43)
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: 0xd33ed98: i32,i32 = sra_parts 0xd338628, 
0xd338738, 0xd331180 [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     0x0a68f1e2
1  clang     0x0a68ee39
2            0x0032a400 __kernel_sigreturn + 0
3  libc.so.6 0x0013dab2 abort + 386
4  clang     0x0a6779bf
5  clang     0x09f76dec
6  clang     0x09f1a182
7  clang     0x09f1e82a llvm::SelectionDAG::LegalizeTypes() + 68
8  clang     0x09ec9993 llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 1061
9  clang     0x09ec9271 
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction 
const>, llvm::ilist_iterator<llvm::Instruction const>, bool&) + 219
10 clang     0x09ecbe49 
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 2559
11 clang     0x09ec8779 
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 723
12 clang     0x09aaf494
13 clang     0x0a04ac85 
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 87
14 clang     0x0a61a80a 
llvm::FPPassManager::runOnFunction(llvm::Function&) + 306
15 clang     0x0a61a9b1 llvm::FPPassManager::runOnModule(llvm::Module&) + 97
16 clang     0x0a61acc2 llvm::MPPassManager::runOnModule(llvm::Module&) 
+ 498
17 clang     0x0a61b25c llvm::PassManagerImpl::run(llvm::Module&) + 234
18 clang     0x0a61b575 llvm::PassManager::run(llvm::Module&) + 39
19 clang     0x089bc788
20 clang     0x089bc81a 
clang::EmitBackendOutput(clang::DiagnosticsEngine&, 
clang::CodeGenOptions const&, clang::TargetOptions const&, 
clang::LangOptions const&, llvm::Module*, clang::BackendAction, 
llvm::raw_ostream*) + 77
21 clang     0x089b8912
22 clang     0x08b66f96 clang::ParseAST(clang::Sema&, bool, bool) + 690
23 clang     0x087af54e clang::ASTFrontendAction::ExecuteAction() + 284
24 clang     0x089b7a53 clang::CodeGenAction::ExecuteAction() + 1065
25 clang     0x087af184 clang::FrontendAction::Execute() + 180
26 clang     0x08787ece 
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 748
27 clang     0x0875b07a 
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 918
28 clang     0x0874c66f cc1_main(char const**, char const**, char 
const*, void*) + 805
29 clang     0x08755f42 main + 521
30 libc.so.6 0x00126bd6 __libc_start_main + 230
31 clang     0x0874bda1
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 
c698d3a2a40f0909d16cbe857685f0f22cb9ae43)
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-e6EdNG.cpp
clang: note: diagnostic msg: /tmp/test-e6EdNG.sh
clang: note: diagnostic msg:

********************
rkotler at laptop-rkotler:~/test$


On 12/19/2012 03:30 AM, Patrik Hagglund wrote:
> Author: patha
> Date: Wed Dec 19 05:30:36 2012
> New Revision: 170532
>
> URL: http://llvm.org/viewvc/llvm-project?rev=170532&view=rev
> Log:
> Change TargetLowering::findRepresentativeClass to take an MVT, instead
> of EVT.
>
> Modified:
>      llvm/trunk/include/llvm/Target/TargetLowering.h
>      llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
>      llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
>      llvm/trunk/lib/Target/ARM/ARMISelLowering.h
>      llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
>      llvm/trunk/lib/Target/X86/X86ISelLowering.h
>
> Modified: llvm/trunk/include/llvm/Target/TargetLowering.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=170532&r1=170531&r2=170532&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Target/TargetLowering.h (original)
> +++ llvm/trunk/include/llvm/Target/TargetLowering.h Wed Dec 19 05:30:36 2012
> @@ -1138,7 +1138,7 @@
>     /// findRepresentativeClass - Return the largest legal super-reg register class
>     /// of the register class for the specified type and its associated "cost".
>     virtual std::pair<const TargetRegisterClass*, uint8_t>
> -  findRepresentativeClass(EVT VT) const;
> +  findRepresentativeClass(MVT VT) const;
>
>     /// computeRegisterProperties - Once all of the register classes are added,
>     /// this allows us to compute derived properties we expose.
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=170532&r1=170531&r2=170532&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Wed Dec 19 05:30:36 2012
> @@ -712,9 +712,9 @@
>   /// findRepresentativeClass - Return the largest legal super-reg register class
>   /// of the register class for the specified type and its associated "cost".
>   std::pair<const TargetRegisterClass*, uint8_t>
> -TargetLowering::findRepresentativeClass(EVT VT) const {
> +TargetLowering::findRepresentativeClass(MVT VT) const {
>     const TargetRegisterInfo *TRI = getTargetMachine().getRegisterInfo();
> -  const TargetRegisterClass *RC = RegClassForVT[VT.getSimpleVT().SimpleTy];
> +  const TargetRegisterClass *RC = RegClassForVT[VT.SimpleTy];
>     if (!RC)
>       return std::make_pair(RC, 0);
>
>
> Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=170532&r1=170531&r2=170532&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
> +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Wed Dec 19 05:30:36 2012
> @@ -863,10 +863,10 @@
>   // due to the common occurrence of cross class copies and subregister insertions
>   // and extractions.
>   std::pair<const TargetRegisterClass*, uint8_t>
> -ARMTargetLowering::findRepresentativeClass(EVT VT) const{
> +ARMTargetLowering::findRepresentativeClass(MVT VT) const{
>     const TargetRegisterClass *RRC = 0;
>     uint8_t Cost = 1;
> -  switch (VT.getSimpleVT().SimpleTy) {
> +  switch (VT.SimpleTy) {
>     default:
>       return TargetLowering::findRepresentativeClass(VT);
>     // Use DPR as representative register class for all floating point
>
> Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.h?rev=170532&r1=170531&r2=170532&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/ARMISelLowering.h (original)
> +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.h Wed Dec 19 05:30:36 2012
> @@ -393,7 +393,7 @@
>                                       unsigned Intrinsic) const;
>     protected:
>       std::pair<const TargetRegisterClass*, uint8_t>
> -    findRepresentativeClass(EVT VT) const;
> +    findRepresentativeClass(MVT VT) const;
>
>     private:
>       /// Subtarget - Keep a pointer to the ARMSubtarget around so that we can
>
> Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=170532&r1=170531&r2=170532&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Dec 19 05:30:36 2012
> @@ -1479,10 +1479,10 @@
>
>   // FIXME: Why this routine is here? Move to RegInfo!
>   std::pair<const TargetRegisterClass*, uint8_t>
> -X86TargetLowering::findRepresentativeClass(EVT VT) const{
> +X86TargetLowering::findRepresentativeClass(MVT VT) const{
>     const TargetRegisterClass *RRC = 0;
>     uint8_t Cost = 1;
> -  switch (VT.getSimpleVT().SimpleTy) {
> +  switch (VT.SimpleTy) {
>     default:
>       return TargetLowering::findRepresentativeClass(VT);
>     case MVT::i8: case MVT::i16: case MVT::i32: case MVT::i64:
>
> Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.h?rev=170532&r1=170531&r2=170532&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original)
> +++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Wed Dec 19 05:30:36 2012
> @@ -716,7 +716,7 @@
>
>     protected:
>       std::pair<const TargetRegisterClass*, uint8_t>
> -    findRepresentativeClass(EVT VT) const;
> +    findRepresentativeClass(MVT VT) const;
>
>     private:
>       /// Subtarget - Keep a pointer to the X86Subtarget around so that we can
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-e6EdNG.cpp
Type: text/x-c++src
Size: 343 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121228/1a10dd5f/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-e6EdNG.sh
Type: application/x-shellscript
Size: 550 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121228/1a10dd5f/attachment.bin>
-------------- 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/20121228/1a10dd5f/attachment.cc>


More information about the llvm-commits mailing list