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

Shengchen Kan via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 1 18:56:12 PDT 2024


KanRobert wrote:

> > > > opt -passes=simplifycfg -mattr=+cf reduced.ll -S
> > > 
> > > 
> > > @dtcxzyw Rebased, still no error
> > > ```
> > > bash$ opt -passes=simplifycfg -mattr=+cf reduced.ll -S
> > > ; ModuleID = 'reduced.ll'
> > > source_filename = "reduced.ll"
> > > target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
> > > target triple = "x86_64-pc-linux-gnu"
> > > 
> > > define i64 @vm_exec_core(i1 %0) #0 {
> > > common.ret:
> > >   ret i64 0
> > > }
> > > 
> > > attributes #0 = { "target-features"="+cf" }
> > > ```
> > 
> > 
> > I also cannot reproduce this with clang+asan build. Maybe it was caused by a bug in gcc 11.4.
> 
> Reproduced with gcc 12.3
> 
> ```
> cmake llvm-project/llvm -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -G Ninja \
>         -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 \
>         -DLLVM_TARGETS_TO_BUILD="X86;RISCV;AArch64" -DLLVM_PARALLEL_LINK_JOBS=4 -DLLVM_ENABLE_ASSERTIONS=ON 
> ```

Reproduced and fixed by https://github.com/llvm/llvm-project/pull/96878/commits/c0545a4289e0c50e49f73e164b02ed5271102f88, probably the known issue of `initializer_list` https://clang.llvm.org/docs/analyzer/developer-docs/InitializerLists.html 

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


More information about the llvm-commits mailing list