summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/implicit-null-checks.mir
Commit message (Collapse)AuthorAgeFilesLines
* [ImplicitNullChecks] Hoist trivial depdendencies if possibleSanjoy Das2016-06-221-0/+266
When trying to convert a loading instruction into a FAULTING_LOAD, we sometimes face code like this: if %R10 is not null: %R9<def> = MOV32ri Immediate %R9<def, tied> = AND32rm %R9, 0x20(%R10) else: goto TRAP In these cases we would like to use the AND32rm instruction as the faulting operation by hoisting the "depedency" def-ing %R9 also above the control flow, transforming the program into: %R9<def> = MOV32ri Immediate %R9<def, tied> = FAULTING_LOAD_OP(AND32rm %R9, 0x20(%R10), FailPath: TRAP) This change teaches ImplicitNullChecks to do the above, when safe. llvm-svn: 273501
OpenPOWER on IntegriCloud