[PATCH] D90760: [InstCombiner] Make LibCallSimplifier add extension attribute to ldexp arg.
Ulrich Weigand via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 9 07:50:45 PST 2020
uweigand added a comment.
I'm not sure whether the call instruction must match the declaration w.r.t. extension attributes. In the IR generated by clang, the two always match:
; Function Attrs: noinline nounwind optnone
define dso_local signext i32 @test(i32 signext %x) #0 {
entry:
%x.addr = alloca i32, align 4
store i32 %x, i32* %x.addr, align 4
%0 = load i32, i32* %x.addr, align 4
ret i32 %0
}
; Function Attrs: noinline nounwind optnone
define dso_local signext i32 @main() #0 {
entry:
%retval = alloca i32, align 4
store i32 0, i32* %retval, align 4
%0 = load i32, i32* @a, align 4
%call = call signext i32 @test(i32 signext %0)
ret i32 %call
}
I'm not sure what is supposed to happen if the two do not match, this doesn't seem obvious from reading the IR specs ...
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90760/new/
https://reviews.llvm.org/D90760
More information about the llvm-commits
mailing list