Skip to content

"no-builtins" should work on __multi3? #65031

Open
@dianqk

Description

@dianqk

https://llvm.godbolt.org/z/9vcj8dqaY

I tried this IR:

define noundef i128 @multer(i128 noundef %0, i128 noundef %1) unnamed_addr #1 {
  %3 = mul i128 %1, %0
  ret i128 %3
}

define noundef i128 @multer2(i128 noundef %0, i128 noundef %1) {
  %3 = mul i128 %1, %0
  ret i128 %3
}

define noundef i128 @__multi3(i128 noundef %0, i128 noundef %1) unnamed_addr #1 {
  ret i128 999
}

attributes #1 = { "no-builtins" }

I expect multer to use the __multi3 function I defined.
But I got:

multer:                                 # @multer
        mov     rax, rdx
        imul    rsi, rdx
        mul     rdi
        add     rdx, rsi
        imul    rcx, rdi
        add     rdx, rcx
        ret
multer2:                                # @multer2
        mov     rax, rdx
        imul    rsi, rdx
        mul     rdi
        add     rdx, rsi
        imul    rcx, rdi
        add     rdx, rcx
        ret
__multi3:                               # @__multi3
        mov     eax, 999
        xor     edx, edx
        ret

Metadata

Metadata

Assignees

No one assigned

    Labels

    compiler-rt:builtinsquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions