Skip to content

llvm-as mis-reads some negative integers #1617

@asl

Description

@asl
Bugzilla Link 1245
Resolution FIXED
Resolved on Feb 22, 2010 12:46
Version trunk
OS Linux
Blocks llvm/llvm-bugzilla-archive#1246
Attachments failed .ll

Extended Description

Consider the attached .ll file.

Do:
llvm-as foo.ll -o - | ./llvm-dif -o foo-cmp.ll

I have (x86-linux):

....

  •   %ov35 = add i32 %ov16, -29              ; <i32> [#uses=1]
    
  •   %ov35 = add i32 %ov16, -93              ; <i32> [#uses=1]
      store i32 %ov35, i32* %state
      %pcc8 = add i32 %pcv7, 1                ; <i32> [#uses=1]
      store i32 %tmp20, i32* %tmp20_c
    

@@ -321,7 +321,7 @@
%ov7 = xor i32 %ov18_cc, 251 ; [#uses=3]
%ov41 = xor i32 %ov7, 116 ; [#uses=1]
%ov63 = sub i32 139, %ov7 ; [#uses=2]

  •   %hvar68 = add i32 %ov63, -1             ; <i32> [#uses=1]
    
  •   %hvar68 = add i32 %ov63, -9             ; <i32> [#uses=1]
    

and so on. Valgrind is quite. It's definitely an assembler bug, since output
binary code is broken.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions