Commit fbcbcd4
Move the bitcast instruction to the correct BB for DP emu
This change insert `i64 -> double` `BitCast` instruction
to the appropriate BB. Before this change, some `BitCast`
instructions can be inserted into incorrect BB, e.g. PHINode:
```
for.cond:
%0 = call i64 @llvm.genx.GenISA.WaveShuffleIndex.i64(i64 %x, i32 %y, i32 0)
br label %BB_01
...
BB_01:
%1 = bitcast i64 %0 to double
%2 = phi double [ %a, %if.then ], [ %b, %if.then1 ], [ %c, %if.then2 ], [ %1, %for.cond ]
```
With this change, we'll get:
```
for.cond:
%0 = call i64 @llvm.genx.GenISA.WaveShuffleIndex.i64(i64 %x, i32 %y, i32 0)
%1 = bitcast i64 %0 to double
br label %BB_01
...
BB_01:
%2 = phi double [ %a, %if.then ], [ %b, %if.then1 ], [ %c, %if.then2 ], [ %1, %for.cond ]
```1 parent 8fb2cb3 commit fbcbcd4
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| 226 | + | |
226 | 227 | | |
227 | 228 | | |
228 | 229 | | |
| |||
0 commit comments