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

via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 26 07:13:04 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() {
----------------
brendaso1 wrote:

hmm in that case do you think it's more beneficial if I put this test in llvm/test/CodeGen/AArch64/arm64-fast-isel-icmp.ll?

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


More information about the llvm-commits mailing list