search for: checkovf

Displaying 4 results from an estimated 4 matches for "checkovf".

2014 Apr 26
3
[LLVMdev] Proposal: add intrinsics for safe division
...w-path to differentiate divide-by-zero from signed overflow. That should be fixed by generalizing the intrinsic so that the two conditions are distinct: %res = call {i32, i1, i1} @llvm.safe.sdiv.i32(i32 %a, i32 %b) %div0 = extractvalue {i32, i1} %res, 1 br i1 %div0, label %trap, label %checkovf checkovf: %ovf = extractvalue {i32, i1} %res, 2 br i1 %div0, label %trap, label %continue trap: call ... unreachable continue: %div = extractvalue {i32, i1} %res, 0 ...or some variation of the above. I don't have a personal stake in this. (2) The safe.div intrinsic inhi...
2014 Apr 26
2
[LLVMdev] Proposal: add intrinsics for safe division
...gned overflow. That should be fixed by > > generalizing the intrinsic so that the two conditions are distinct: > > > > %res = call {i32, i1, i1} @llvm.safe.sdiv.i32(i32 %a, i32 %b) > > %div0 = extractvalue {i32, i1} %res, 1 > > br i1 %div0, label %trap, label %checkovf > > > > checkovf: > > %ovf = extractvalue {i32, i1} %res, 2 > > br i1 %div0, label %trap, label %continue > > > > trap: > > call ... > > unreachable > > > > continue: > > %div = extractvalue {i32, i1} %res, 0 > >...
2014 Apr 25
3
[LLVMdev] Proposal: add intrinsics for safe division
On April 25, 2014 at 1:44:37 PM, Reid Kleckner (rnk at google.com) wrote: Thanks for the writeup! It's very helpful. On Fri, Apr 25, 2014 at 11:49 AM, Filip Pizlo <fpizlo at apple.com> wrote: On April 25, 2014 at 10:48:18 AM, Reid Kleckner (rnk at google.com) wrote: On Fri, Apr 25, 2014 at 10:19 AM, Filip Pizlo <fpizlo at apple.com> wrote: The sdiv operation in LLVM IR only
2014 Apr 29
2
[LLVMdev] Proposal: add intrinsics for safe division
...gt;> > generalizing the intrinsic so that the two conditions are distinct: >> > >> > %res = call {i32, i1, i1} @llvm.safe.sdiv.i32(i32 %a, i32 %b) >> > %div0 = extractvalue {i32, i1} %res, 1 >> > br i1 %div0, label %trap, label %checkovf >> > >> > checkovf: >> > %ovf = extractvalue {i32, i1} %res, 2 >> > br i1 %div0, label %trap, label %continue >> > >> > trap: >> > call ... >> > unreachable >> > >>...