[PATCH] D87210: [Sparc] Remove cast that truncates immediate operands to 32 bits.

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 6 14:33:45 PDT 2020


jrtc27 requested changes to this revision.
jrtc27 added a comment.
This revision now requires changes to proceed.

Needs a test case; something like:

  diff --git a/llvm/test/CodeGen/SPARC/inlineasm-v9.ll b/llvm/test/CodeGen/SPARC/inlineasm-v9.ll
  index 53ab114dd8d5..1388c8655ace 100644
  --- a/llvm/test/CodeGen/SPARC/inlineasm-v9.ll
  +++ b/llvm/test/CodeGen/SPARC/inlineasm-v9.ll
  @@ -39,3 +39,12 @@ entry:
     tail call void asm sideeffect "faddq $0,$1,$2", "{f40},{f40},{f40}"(fp128 0xL0, fp128 0xL0, fp128 0xL0)
     ret void
   }
  +
  +;; Ensure that 64-bit immediates aren't truncated
  +; CHECK-LABEL: test_large_immediate
  +; CHECK: or %o0, %lo(4294967296), %o0
  +define i64 @test_large_immediate(i64) {
  +entry:
  +  %1 = tail call i64 asm "or $0, %lo($1), $0", "=r,i,r"(i64 4294967296, i64 %0)
  +  ret i64 %1
  +}

as I believe this only affects emitting inline assembly operands (normal and memory)? Round-tripping assembly through llvm-mc isn't enough to hit this path.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87210/new/

https://reviews.llvm.org/D87210



More information about the llvm-commits mailing list