Skip to content

CBE can generate name conflicts #1536

@lattner

Description

@lattner
Bugzilla Link 1164
Resolution FIXED
Resolved on Feb 22, 2010 12:44
Version trunk
OS All

Extended Description

Consider:

@​G = global i32 123
@​ltmp_0_1 = global i32 123

define i32 @​test(i32 %G) {
%A = load i32
%G
%B = load i32* @​ltmp_0_1
%C = add i32 %A, %B
ret i32 %C
}

The CBE generated code is:

unsigned int test(unsigned int *ltmp_0_1) {
...
ltmp_1_2 = *ltmp_0_1; // local
ltmp_2_2 = *(&ltmp_0_1); // global
return (ltmp_1_2 + ltmp_2_2);
...

This is a serious bug.

A not-as-serious bug: the CBE ignores the local names of symbols, turning %A into ltmp_1_2?

-Chris

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions