Commit e13573e
authored
[InstCombine]PtrReplacer: Correctly handle select with unavailable operands (llvm#3119)
The testcase I added previously failed because a SelectInst with invalid
operands was created (one side `addrspace(4)`, the other
`addrspace(5)`).
PointerReplacer needs to dig deeper if the true and/or false
instructions of the select are not available.
Fixes SWDEV-542957
llvm#1488291 parent 1a2974a commit e13573e
File tree
2 files changed
+54
-7
lines changed- llvm
- lib/Transforms/InstCombine
- test/Transforms/InstCombine/AMDGPU
2 files changed
+54
-7
lines changedLines changed: 21 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
281 | 290 | | |
282 | 291 | | |
283 | 292 | | |
| |||
310 | 319 | | |
311 | 320 | | |
312 | 321 | | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
| 322 | + | |
317 | 323 | | |
318 | | - | |
319 | 324 | | |
320 | 325 | | |
321 | 326 | | |
322 | 327 | | |
323 | 328 | | |
324 | 329 | | |
325 | 330 | | |
326 | | - | |
327 | | - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
328 | 342 | | |
329 | 343 | | |
330 | 344 | | |
| |||
Lines changed: 33 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
79 | 112 | | |
0 commit comments