Issue 56677
Summary optimize for builtin functions
Labels
Assignees
Reporter BaoshanPang
    Is it possible to teach llvm do optimizations on builtin functions?
For such code:
void test_mtspr() {
__builtin_ppc_mtspr(3,5);
__builtin_ppc_mtspr(3,5);
}
With command:
clang -cc1 -internal-isystem ~/mywork/llvm/build/lib/clang/15.0.0/include -nostdsysteminc -triple powerpc-unknown-unknown -S y.c -O2
The generated asm code is like this:
# %bb.0:                                # %entry
    li 3, 5
    mtudscr 3
    mtudscr 3
    blr


Can LLVM remove the second mtudscr?
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to