================
@@ -0,0 +1,77 @@
+// Check that -fsanitize=signed-integer-wrap instruments with -fwrapv
+// RUN: %clang_cc1 -fwrapv -triple x86_64-apple-darwin -emit-llvm -o - %s 
-fsanitize=signed-integer-wrap | FileCheck %s --check-prefix=CHECKSIW
+
+// Check that -fsanitize=signed-integer-overflow doesn't instrument with 
-fwrapv
+// RUN: %clang_cc1 -fwrapv -triple x86_64-apple-darwin -emit-llvm -o - %s 
-fsanitize=signed-integer-overflow | FileCheck %s --check-prefix=CHECKSIO
+
+extern volatile int a, b, c;
+
+// CHECKSIW-LABEL: define void @test_add_overflow
----------------
JustinStitt wrote:

I believe @tschuett was saying that to be confident we are instrumenting the 
arithmetic (and the correct operands therein) we should check the overflow bit 
usage in the branch instruction. The only way I could think of doing this was 
capturing the call to the overflow intrinsic which returns the value and the 
overflow bit. Is there a way to minimize my CHECKs? 

https://github.com/llvm/llvm-project/pull/80089
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to