[clang] [llvm] [WebAssembly] Add `-i128:128` to the `datalayout` string. (PR #119204)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 11:32:26 PST 2024
================
@@ -524,9 +524,7 @@ define i64 @utest_f64i64(double %x) {
; CHECK-NEXT: local.get 0
; CHECK-NEXT: call __fixunsdfti
; CHECK-NEXT: local.get 1
-; CHECK-NEXT: i32.const 8
-; CHECK-NEXT: i32.add
-; CHECK-NEXT: i64.load 0
+; CHECK-NEXT: i64.load 8
----------------
workingjubilee wrote:
hmm. in general, more folds are valid with naturally-aligned types, because if you see two random 4-byte-aligned types, using an 8-byte-aligned load is only valid if they're on the same boundary. LLVM tends to allow these sorts of things that are only relevant for some machines to creep into its global reasoning about optimization, and not with no reason: it's always safer to do the more conservative optimization that is valid on all machines.
so wasm's model might suggest it shouldn't be affected by this, but in practice LLVM reasons substantially about this. so I am not surprised a machine model that _should_ care less still optimizes better.
https://github.com/llvm/llvm-project/pull/119204
More information about the llvm-commits
mailing list