Skip to content

Method createICmpUGT calls ULT instead of UGT #5

@Nexword

Description

@Nexword

The method Builder.createICmpUGT incorrectly calls createICmpULT. This leads to wrong code generation for unsigned greater-than comparisons.

Current behavior:

createICmpUGT(lhs: LLVMValue, rhs: LLVMValue, name?: string) {
    const result = this.builder.createICmpULT(lhs.unwrapped, rhs.unwrapped, name);
    return LLVMValue.create(result, this.generator);
 }

Expected behavior:

createICmpUGT(lhs: LLVMValue, rhs: LLVMValue, name?: string) {
  const result = this.builder.createICmpUGT(lhs.unwrapped, rhs.unwrapped, name);
  return LLVMValue.create(result, this.generator);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions