Displaying 1 result from an estimated 1 matches for "sel_0_or_2".
Did you mean:
sel_0_or_
2016 Sep 28
4
IR canonicalization: select or bool math?
...32 %b
}
6. Does 'sub' make a difference?
a. define i32 @sel_1_or_2(i1 %a) {
%b = select i1 %a, i32 1, i32 2
ret i32 %b
}
b. define i32 @sel_1_or_2(i1 %a) {
%b = zext i1 %a to i32
%c = sub i32 2, %b
ret i32 %c
}
7. Choose between integers that are not consecutive?
a. define i32 @sel_0_or_2(i1 %a) {
%sel = select i1 %a, i32 2, i32 0
ret i32 %sel2
}
b. define i32 @sel_0_or_2(i1 %a) {
%zexta = zext i1 %a to i32
%add = add i32 %zexta, %zexta
ret i32 %add
}
8. Choose {0,1,2} based on 2 bools?
a. define i32 @sel_sel(i1 %a, i1 %b) {
%zexta = zext i1 %a to i32
%sel1 = select...