================ @@ -0,0 +1,105 @@ +; Test that BasicAA conservatively returns MayAlias for local allocas in +; functions containing returns_twice calls (e.g. setjmp/sigsetjmp), to prevent +; miscompilation via longjmp re-entry paths invisible in the forward CFG. +; +; Reproduces: https://github.com/llvm/llvm-project/issues/198967 +; +; Without the fix, GVN incorrectly concludes that the store through %p_val +; (which may alias %i via a longjmp re-entry) cannot modify %i, then DSE +; eliminates the "store i32 13, ptr %i" as dead. The fix makes +; EarliestEscapeAnalysis conservatively bail out at the point where +; isNotCapturedBefore would otherwise return true, if the function contains +; any returns_twice call. + +; RUN: opt < %s -aa-pipeline=basic-aa -passes=gvn,dse -S | FileCheck %s + +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" ---------------- midhuncodes7 wrote:
Removed https://github.com/llvm/llvm-project/pull/212297 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
