I am having some problems with the generated code having wrong constants in the constant pull. Adding a dump of "C" and "E" in SelectionDAG::getConstantPool I get C: ---------------------------------------------------------- %str = internal constant [12 x sbyte] c"Hello World\00" ; <[12 x sbyte]*> [#uses=1] ----------------------------------------------------------- E: ----------------------------------------------------------- 0x89f8ea0: i32 = ConstantPool < declare int %puts(sbyte*)> 0----------------------------------------------------------- This can be reproduced by running "llvm-as hello.ll -o - | llc -march=arm". Is this a bug in CSEMap? Best Regards, Rafael
I think that the problem is in SelectionDAG::getConstantPool itself. Only Alignment and Offset are used in the ID. This causes false aliases. X86TargetLowering::LowerFABS should also be affected. All of its calls to getConstantPool have the same alignment and offset. Best Regards, Rafael
On Mon, 14 Aug 2006, [UTF-8] Rafael Esp?ndola wrote:> I think that the problem is in SelectionDAG::getConstantPool itself. > Only Alignment and Offset are used in the ID. This causes false > aliases.Doh. Sorry about that, I just checked in a fix. Please verify that this corrects the problem.> X86TargetLowering::LowerFABS should also be affected. All of its calls > to getConstantPool have the same alignment and offset.I think that this should be okay, but I'll let Evan comment on it. -Chris -- http://nondot.org/sabre/ http://llvm.org/