[PATCH] Make llvm.eh.begincatch use an outparam
Reid Kleckner
rnk at google.com
Tue Mar 3 14:01:07 PST 2015
REPOSITORY
rL LLVM
================
Comment at: test/CodeGen/X86/cppeh-catch-scalar.ll:65
@@ -64,7 +64,3 @@
%exn11 = load i8** %exn.slot
- %4 = call i8* @llvm.eh.begincatch(i8* %exn11) #3
- %5 = bitcast i8* %4 to i32*
- %6 = load i32* %5, align 4
- store i32 %6, i32* %i, align 4
- %7 = load i32* %i, align 4
- call void @_Z10handle_inti(i32 %7)
+ %i.i8 = bitcast i32* %i to i8*
+ call void @llvm.eh.begincatch(i8* %exn11, i8* %i.i8) #3
----------------
andrew.w.kaylor wrote:
> Any reason that the bitcast isn't done in the call line?
That only happens for bitcasts of constants. Typically pointer bitcasts of global objects get that.
================
Comment at: test/CodeGen/X86/cppeh-catch-scalar.ll:90
@@ -91,3 +89,3 @@
; CHECK: %eh.data = bitcast i8* %eh.alloc to %struct._Z4testv.ehdata*
; CHECK: %eh.obj.ptr = getelementptr inbounds %struct._Z4testv.ehdata* %eh.data, i32 0, i32 1
; CHECK: %eh.obj = load i8** %eh.obj.ptr
----------------
andrew.w.kaylor wrote:
> This should go away.
True, I guess I should do a follow-up for that.
http://reviews.llvm.org/D7920
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list