[llvm] [X86][SimplifyCFG] Support hoisting load/store with conditional faulting (PR #96878)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 27 22:38:29 PDT 2024


================
@@ -0,0 +1,460 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
----------------
dtcxzyw wrote:

Can you add some tests with gep?
```
define i32 @cload(ptr %x)  {
entry:
  %tobool.not = icmp eq ptr %x, null
  br i1 %tobool.not, label %cond.end, label %cond.true

cond.true:                                        ; preds = %entry
  %arrayidx = getelementptr inbounds i8, ptr %x, i64 16
  %0 = load i32, ptr %arrayidx, align 4, !tbaa !9
  br label %cond.end

cond.end:                                         ; preds = %entry, %cond.true
  %cond = phi i32 [ %0, %cond.true ], [ 0, %entry ]
  ret i32 %cond
}
```

https://github.com/llvm/llvm-project/pull/96878


More information about the llvm-commits mailing list