Do not lower malloc's to pass "sizeof" expressions like this:

ltmp_0_7 = malloc(((unsigned )(&(((signed char (*)[784])/*NULL*/0)[1u]))));

Instead, just emit the literal constant, like this:

  ltmp_0_7 = malloc(784u);

This works around a bug in ICC 8.1 compiling the CBE generated code.  :-(

llvm-svn: 20415
This commit is contained in:
Chris Lattner 2005-03-03 01:04:50 +00:00
parent ef1e989e4f
commit 1a678c67c9
1 changed files with 1 additions and 1 deletions

View File

@ -1720,7 +1720,7 @@ void CWriter::visitVAArgInst(VAArgInst &I) {
bool CTargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &o) {
PM.add(createLowerGCPass());
PM.add(createLowerAllocationsPass());
PM.add(createLowerAllocationsPass(true));
PM.add(createLowerInvokePass());
PM.add(new CBackendNameAllUsedStructs());
PM.add(new CWriter(o, getIntrinsicLowering()));