[llvm] [FastISel][AArch64] Compare Instruction Miscompilation Fix (PR #75993)

David Green via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 27 08:47:14 PST 2023


================
@@ -0,0 +1,33 @@
+; RUN: llc --global-isel=false -fast-isel -O0 -mtriple=aarch64-none-none < %s | FileCheck %s
+
+; Check that the shl instruction did not get folded in together with 
+; the cmp instruction. It would create a miscompilation 
+
+ at A = dso_local global [5 x i8] c"\C8\AA\C8\AA\AA"
+ at .str = private unnamed_addr constant [13 x i8] c"TRUE BRANCH\0A\00"
+ at .str.1 = private unnamed_addr constant [14 x i8] c"FALSE BRANCH\0A\00"
+
+define dso_local i32 @main() {
----------------
davemgreen wrote:

Yeah that sounds like it might be a good place for it. Feel free to use the update_llc_test_checks script too to generate the check lines.

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


More information about the llvm-commits mailing list