Commit 9fe158e
- Enforce immediate value constraint for inline asm.
- Fixed a bug where the source of an inline asm call with multiple outputs was not being matched in PatternMatchPass.
- Fixed an issue where LLVM promotes a variable to a constant, causing an immediate value to be written to the asm string when it should not be.
__asm__ ("mov (M1, 16) %0(0,0)<1> %1(0,0)<1;1,0>" : "=rw" (s1) : "rw" (s2) );
When s2 is promoted to a constant value, the following vISA instruction is generated. The immediate value still contains the regioning info from the user inlined string.
mov (M1, 16) V39(0,0)<1> 0x3f800000:f(0,0)<1;1,0>
By enforcing the constraint, if we detect an immediate value with the "rw" constraint, we can generate an extra move instruction to resolve this issue.
Change-Id: I6421d88b41bad8fa2915e03ccab759b1eb02428c1 parent 97ed538 commit 9fe158e
File tree
2 files changed
+24
-6
lines changed- IGC/Compiler/CISACodeGen
2 files changed
+24
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8140 | 8140 | | |
8141 | 8141 | | |
8142 | 8142 | | |
| 8143 | + | |
| 8144 | + | |
8143 | 8145 | | |
8144 | 8146 | | |
8145 | 8147 | | |
| |||
8160 | 8162 | | |
8161 | 8163 | | |
8162 | 8164 | | |
| 8165 | + | |
| 8166 | + | |
| 8167 | + | |
| 8168 | + | |
| 8169 | + | |
| 8170 | + | |
| 8171 | + | |
| 8172 | + | |
| 8173 | + | |
| 8174 | + | |
| 8175 | + | |
| 8176 | + | |
| 8177 | + | |
| 8178 | + | |
8163 | 8179 | | |
8164 | 8180 | | |
8165 | 8181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1349 | 1349 | | |
1350 | 1350 | | |
1351 | 1351 | | |
1352 | | - | |
1353 | 1352 | | |
1354 | 1353 | | |
1355 | | - | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
1356 | 1359 | | |
1357 | 1360 | | |
1358 | | - | |
1359 | | - | |
1360 | | - | |
| 1361 | + | |
1361 | 1362 | | |
1362 | 1363 | | |
1363 | | - | |
| 1364 | + | |
| 1365 | + | |
1364 | 1366 | | |
1365 | 1367 | | |
1366 | 1368 | | |
| |||
0 commit comments