[llvm-commits] [llvm] r72431 - in /llvm/trunk/lib/Target: CellSPU/SPUISelLowering.cpp X86/X86ISelLowering.cpp
Daniel Dunbar
daniel at zuster.org
Tue May 26 14:26:15 PDT 2009
Hi Eli,
I'm backing this out for now, I'm seeing lots of compilation failures
due to it. Here is a small failing example:
--
ddunbar at lordcrumb:tmp$ cat t.c
float f0(void) {
float returnValue = 0;
unsigned long long value = 0;
f1(&value);
returnValue = value;
return returnValue;
}
ddunbar at lordcrumb:tmp$ clang -m32 -c t.c
Assertion failed: (From.getNode() != To.getNode() && "Potential
legalization loop!"), function ReplaceValueWithHelper, file
LegalizeTypes.cpp, line 674.
0 clang-cc 0x0000000100e6e4a0 PrintStackTrace(void*) + 38
1 clang-cc 0x0000000100e6e9b0 SignalHandler(int) + 288
2 libSystem.B.dylib 0x00007fff87c8890a _sigtramp + 26
3 clang-cc 0x00000001004fbe7d
llvm::SmallVectorImpl<llvm::SDValue>::~SmallVectorImpl() + 45
4 libSystem.B.dylib 0x00007fff87ce7072 __assert_rtn + 237
5 clang-cc 0x0000000100a00f51
llvm::DAGTypeLegalizer::ReplaceValueWithHelper(llvm::SDValue,
llvm::SDValue) + 157
6 clang-cc 0x0000000100a012c7
llvm::DAGTypeLegalizer::ReplaceValueWith(llvm::SDValue, llvm::SDValue)
+ 201
7 clang-cc 0x0000000100a014b9
llvm::DAGTypeLegalizer::CustomLowerResults(llvm::SDNode*, llvm::MVT,
bool) + 495
8 clang-cc 0x00000001009ee262
llvm::DAGTypeLegalizer::ExpandIntegerOperand(llvm::SDNode*, unsigned
int) + 218
9 clang-cc 0x0000000100a02569 llvm::DAGTypeLegalizer::run() + 1155
10 clang-cc 0x0000000100a02d62
llvm::SelectionDAG::LegalizeTypes() + 66
11 clang-cc 0x0000000100a9bf46
llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 1088
12 clang-cc 0x0000000100a9e9e3
llvm::SelectionDAGISel::SelectBasicBlock(llvm::BasicBlock*,
llvm::ilist_iterator<llvm::Instruction>,
llvm::ilist_iterator<llvm::Instruction>) + 407
13 clang-cc 0x0000000100a9f432
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function&,
llvm::MachineFunction&, llvm::MachineModuleInfo*, llvm::DwarfWriter*,
llvm::TargetInstrInfo const&) + 2400
14 clang-cc 0x0000000100aa0203
llvm::SelectionDAGISel::runOnFunction(llvm::Function&) + 961
15 clang-cc 0x0000000100df726e
llvm::FPPassManager::runOnFunction(llvm::Function&) + 256
16 clang-cc 0x0000000100df77e3
llvm::FunctionPassManagerImpl::run(llvm::Function&) + 111
17 clang-cc 0x0000000100df7996
llvm::FunctionPassManager::run(llvm::Function&) + 134
18 clang-cc 0x0000000100048b73 (anonymous
namespace)::BackendConsumer::EmitAssembly() + 747
19 clang-cc 0x0000000100048c47 (anonymous
namespace)::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
+ 141
20 clang-cc 0x0000000100234293
clang::ParseAST(clang::Preprocessor&, clang::ASTConsumer*,
clang::ASTContext&, bool, bool) + 537
21 clang-cc 0x00000001000309c5
ProcessInputFile(clang::Preprocessor&, clang::PreprocessorFactory&,
std::string const&, ProgActions, llvm::StringMap<bool,
llvm::MallocAllocator> const&) + 3906
22 clang-cc 0x0000000100032244 main + 2638
23 clang-cc 0x000000010002cc58 start + 52
Stack dump:
0. Program arguments: /Volumes/Data/ddunbar/llvm/Debug/bin/clang-cc
-triple i386-apple-darwin10 -S -disable-free -main-file-name t.c
--relocation-model pic -pic-level=1 --disable-fp-elim
--unwind-tables=0 --mcpu=yonah --fmath-errno=0
-mmacosx-version-min=10.6.0 -fdiagnostics-show-option -o
/var/folders/cl/clrOX6SaG+moCeRKEI4PtU+++TI/-Tmp-/cc-Ygi2rl.s -x c t.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'X86 DAG->DAG Instruction Selection' on function '@f0'
--
- Daniel
On Tue, May 26, 2009 at 12:18 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> Author: efriedma
> Date: Tue May 26 14:18:56 2009
> New Revision: 72431
>
> URL: http://llvm.org/viewvc/llvm-project?rev=72431&view=rev
> Log:
> Don't abuse the quirky behavior of LegalizeDAG for XINT_TO_FP and
> FP_TO_XINT. Necessary for some cleanups I'm working on.
>
>
> Modified:
> llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp
> llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
>
> Modified: llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp?rev=72431&r1=72430&r2=72431&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp (original)
> +++ llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp Tue May 26 14:18:56 2009
> @@ -2304,7 +2304,7 @@
> return ExpandLibCall(LC, Op, DAG, false, Dummy, TLI);
> }
>
> - return SDValue();
> + return Op;
> }
>
> //! Lower ISD::SINT_TO_FP, ISD::UINT_TO_FP for i32
> @@ -2330,7 +2330,7 @@
> return ExpandLibCall(LC, Op, DAG, false, Dummy, TLI);
> }
>
> - return SDValue();
> + return Op;
> }
>
> //! Lower ISD::SETCC
>
> Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=72431&r1=72430&r2=72431&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue May 26 14:18:56 2009
> @@ -4595,10 +4595,10 @@
>
> // These are really Legal; caller falls through into that case.
> if (SrcVT == MVT::i32 && isScalarFPTypeInSSEReg(Op.getValueType()))
> - return SDValue();
> + return Op;
> if (SrcVT == MVT::i64 && Op.getValueType() != MVT::f80 &&
> Subtarget->is64Bit())
> - return SDValue();
> + return Op;
>
> DebugLoc dl = Op.getDebugLoc();
> unsigned Size = SrcVT.getSizeInBits()/8;
> @@ -4795,7 +4795,7 @@
> if (SrcVT == MVT::i64) {
> // We only handle SSE2 f64 target here; caller can handle the rest.
> if (Op.getValueType() != MVT::f64 || !X86ScalarSSEf64)
> - return SDValue();
> + return Op;
>
> return LowerUINT_TO_FP_i64(Op, DAG);
> } else if (SrcVT == MVT::i32 && X86ScalarSSEf64) {
> @@ -4881,7 +4881,7 @@
> SDValue X86TargetLowering::LowerFP_TO_SINT(SDValue Op, SelectionDAG &DAG) {
> std::pair<SDValue,SDValue> Vals = FP_TO_INTHelper(Op, DAG, true);
> SDValue FIST = Vals.first, StackSlot = Vals.second;
> - if (FIST.getNode() == 0) return SDValue();
> + if (FIST.getNode() == 0) return Op;
>
> // Load the result.
> return DAG.getLoad(Op.getValueType(), Op.getDebugLoc(),
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list