search for: calculateimportantresult

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

2015 Jan 28
15
[LLVMdev] RFC: Proposal for Poison Semantics
...performs an overflow is undefined behavior. In LLVM, executing an instruction which is marked `nsw` but which violates signed overflow results in poison. Values which have no relationship with poisoned values are not effected by them. Let us take the following C program into consideration: ``` int calculateImportantResult(int a, int b) { int result = 0; if (a) { result = a + b; } return result; } ``` A straightforward lowering to LLVM IR could be: ``` define i32 @calculateImportantResult(i32 %a, i32 %b) { entry: %tobool = icmp ne i32 %a, 0 br i1 %tobool, label %if.then, label %if.end if.then: %ad...
2015 Jan 29
5
[LLVMdev] RFC: Proposal for Poison Semantics
...VM, executing an instruction which is marked `nsw` but which > violates signed overflow results in poison. Values which have no > relationship with poisoned values are not effected by them. > > Let us take the following C program into consideration: > ``` > int calculateImportantResult(int a, int b) { > int result = 0; > if (a) { > result = a + b; > } > return result; > } > ``` > > A straightforward lowering to LLVM IR could be: > ``` > define i32 @calculateImportantResult(i32 %a, i32 %b) { >...
2015 Jan 28
2
[LLVMdev] RFC: Proposal for Poison Semantics
...; instruction which is marked `nsw` but which violates signed overflow > results > > in poison. Values which have no relationship with poisoned values are not > > effected by them. > > > > Let us take the following C program into consideration: > > ``` > > int calculateImportantResult(int a, int b) { > > int result = 0; > > if (a) { > > result = a + b; > > } > > return result; > > } > > ``` > > > > A straightforward lowering to LLVM IR could be: > > ``` > > define i32 @calculateImportantResult(i32 %a,...
2015 Feb 03
6
[LLVMdev] Proposal for Poison Semantics
...gt; executing an instruction which is marked `nsw` but which violates signed > overflow results in poison. Values which have no relationship with poisoned > values are not effected by them. > > > > Let us take the following C program into consideration: > > ``` > > int calculateImportantResult(int a, int b) { > > int result = 0; > > if (a) { > > result = a + b; > > } > > return result; > > } > > ``` > > > > A straightforward lowering to LLVM IR could be: > > ``` > > define i32 @calculateImportantResult(i32 %a,...