[llvm] [DAGCombiner] Add some very basic folds for ADDRSPACECAST (PR #127733)

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 19 08:24:18 PST 2025


================
@@ -332,9 +332,7 @@ define signext i32 @setlength() {
 ; CHECK: lgr     [[MALLOC:[0-9]+]],3
 ; CHECK: basr    7,6
 ; CHECK: lgr     [[LENGTH:[0-9]+]],3
-; CHECK: la      [[ADDR:[0-9]+]],4([[MALLOC]])
-; CHECK: llgtr   [[ADDR]],[[ADDR]]
----------------
uweigand wrote:

Removing the `llgtr` is definitely a semantic change here; it removes the zeroing of high bits.  @redstar can you verify whether the new code is still correct on z/OS?

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


More information about the llvm-commits mailing list